code: private void addSettingsTypes(
          String entityType,
          Map<String, CmsType> types,
          Map<String, CmsXmlContentProperty> settingsConfig,
          List<I_CmsFormatterBean> nestedFormatters) {
  
          CmsType baseType = types.get(entityType);
          CmsType settingType = new CmsType(SETTING_TYPE_NAME);
          types.put(settingType.getId(), settingType);
          baseType.addAttribute(SETTINGS_CLIENT_ID_ATTRIBUTE, settingType, 1, 1);
          // add main settings first
          for (Entry<String, CmsXmlContentProperty> entry : settingsConfig.entrySet()) {
              boolean nested = false;
              if (nestedFormatters != null) {
                  for (I_CmsFormatterBean formatter : nestedFormatters) {
                      if (entry.getKey().startsWith(formatter.getId())) {
                          nested = true;
                          break;
                      }
                  }
              }
              if (!nested) {
                  baseType.addAttribute(getSettingsAttributeName(entry.getKey()), settingType, 0, 1);
              }
          }
          // add nested formatter settings after
          for (Entry<String, CmsXmlContentProperty> entry : settingsConfig.entrySet()) {
              if (nestedFormatters != null) {
                  for (I_CmsFormatterBean formatter : nestedFormatters) {
                      if (entry.getKey().startsWith(formatter.getId())
                          && !HIDDEN_SETTINGS_WIDGET_NAME.equals(entry.getValue().getWidget())) {
                          CmsType parent = types.get(formatter.getId());
                          if (parent == null) {
                              parent = new CmsType(formatter.getId());
                              types.put(parent.getId(), parent);
                              baseType.addAttribute(getSettingsAttributeName(formatter.getId()), parent, 1, 1);
                          }
                          parent.addAttribute(getSettingsAttributeName(entry.getKey()), settingType, 0, 1);
                          break;
                      }
                  }
              }
          }
      }
docs: Adds the entity types according to the setting configuration.<p>
  
  @param entityType the entity base type name
  @param types the types
  @param settingsConfig the setting configuration
  @param nestedFormatters the nested formatters