docs: public CmsElementSettingsConfig getElementSettingsConfig(
          CmsResource page,
          CmsContainerElementBean element,
          String containerId,
          Collection<CmsContainer> containers)
      throws CmsException {
  
          Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
          Locale requestLocale = m_cms.getRequestContext().getLocale();
          m_cms.getRequestContext().setLocale(m_locale);
          element.initResource(m_cms);
          if (element.getResource().isFolder()) {
              return null;
          }
          String schema = null;
          try {
              I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(element.getResource());
              schema = type.getConfiguration().getString("schema", null);
          } catch (Exception e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
  
          CmsContainerElementData elementData = getBaseElementData(page, element);
          Supplier<CmsXmlContent> contentSupplier = Suppliers.memoize(() -> {
              try {
                  return CmsXmlContentFactory.unmarshal(m_cms, m_cms.readFile(element.getResource()));
              } catch (CmsException e) {
                  LOG.error(e.getLocalizedMessage(), e);
                  return null;
              }
          });
          if (!element.isGroupContainer(m_cms) && !element.isInheritedContainer(m_cms)) {
              CmsFormatterConfiguration formatterConfiguraton = getFormatterConfiguration(element.getResource());
              Map<String, Map<String, CmsFormatterConfig>> formatters = new HashMap<String, Map<String, CmsFormatterConfig>>();
              for (CmsContainer cnt : containers) {
                  if (cnt.getName().equals(containerId)) {
                      Map<String, CmsFormatterConfig> containerFormatters = new LinkedHashMap<String, CmsFormatterConfig>();
                      boolean missesFormatterSetting = !elementData.getSettings().containsKey(
                          CmsFormatterConfig.getSettingsKeyForContainer(cnt.getName()));
                      Map<String, I_CmsFormatterBean> formatterSelection = formatterConfiguraton.getFormatterSelection(
                          cnt.getType(),
                          cnt.getWidth());
                      for (Entry<String, I_CmsFormatterBean> formatterEntry : formatterSelection.entrySet()) {
                          I_CmsFormatterBean formatter = formatterEntry.getValue();
                          String id = formatterEntry.getKey();
                          if (missesFormatterSetting
                              && ((element.getFormatterId() == null)
                                  || element.getFormatterId().equals(formatter.getJspStructureId()))) {
                              elementData.getSettings().put(
                                  CmsFormatterConfig.getSettingsKeyForContainer(cnt.getName()),
                                  id);
                              missesFormatterSetting = false;
                          }
                          String label = formatter.getNiceName(OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms));
                          if (formatterEntry.getKey().startsWith(CmsFormatterConfig.SCHEMA_FORMATTER_ID)) {
                              label = Messages.get().getBundle().key(Messages.GUI_SCHEMA_FORMATTER_LABEL_0)
                                  + " ["
                                  + CmsResource.getName(formatter.getJspRootPath())
                                  + "]";
                          }
                          if (CmsStringUtil.isEmptyOrWhitespaceOnly(label)) {
                              label = id;
                          }
                          CmsFormatterConfig config = new CmsFormatterConfig(id);
                          Set<String> cssResources = new LinkedHashSet<String>();
                          for (String cssSitePath : formatter.getCssHeadIncludes()) {
                              cssResources.add(OpenCms.getLinkManager().getOnlineLink(m_cms, cssSitePath));
                          }
                          config.setCssResources(cssResources);
                          config.setInlineCss(formatter.getInlineCss());
                          config.setLabel(label);
                          config.setDescription(
                              formatter.getDescription(OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms)));
                          Map<String, CmsXmlContentProperty> settingsConfig = OpenCms.getADEManager().getFormatterSettings(
                              m_cms,
                              formatter,
                              element.getResource(),
                              m_locale,
                              m_req);
                          Function<String, String> templateSource = createStringTemplateSource(
                              formatter,
                              contentSupplier);
                          settingsConfig = CmsXmlContentPropertyHelper.resolveMacrosForPropertyInfo(
                              m_cms,
                              page,
                              element.getResource(),
                              contentSupplier,
                              templateSource,
                              settingsConfig);
                          config.setSettingConfig(settingsConfig);
                          List<I_CmsFormatterBean> nestedFormatters = OpenCms.getADEManager().getNestedFormatters(
                              m_cms,
                              element.getResource(),
                              m_locale,
                              m_req);
                          if ((nestedFormatters != null) && !nestedFormatters.isEmpty()) {
                              Map<String, String> settingPrefixes = new LinkedHashMap<String, String>();
                              for (I_CmsFormatterBean nested : nestedFormatters) {
                                  settingPrefixes.put(
                                      nested.getId(),
                                      nested.getNiceName(OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms)));
                              }
                              config.setNestedFormatterPrefixes(settingPrefixes);
                          }
  
                          config.setJspRootPath(formatter.getJspRootPath());
                          containerFormatters.put(id, config);
                      }
                      formatters.put(cnt.getName(), containerFormatters);
                  }
              }
              elementData.setFormatters(formatters);
          }
  
          m_cms.getRequestContext().setLocale(requestLocale);
          ArrayList<CmsAdditionalInfoBean> infos = new ArrayList<>();
  
          CmsResource resource = element.getResource();
          String resTypeName = OpenCms.getResourceManager().getResourceType(resource).getTypeName();
          CmsExplorerTypeSettings cmsExplorerTypeSettings = OpenCms.getWorkplaceManager().getExplorerTypeSetting(
              resTypeName);
          if (null == cmsExplorerTypeSettings) {
              CmsMessageContainer errMsg = org.opencms.gwt.Messages.get().container(
                  org.opencms.gwt.Messages.ERR_EXPLORER_TYPE_SETTINGS_FOR_RESOURCE_TYPE_NOT_FOUND_3,
                  resource.getRootPath(),
                  resTypeName,
                  Integer.valueOf(resource.getTypeId()));
              throw new CmsConfigurationException(errMsg);
          }
          String key = cmsExplorerTypeSettings.getKey();
          Locale currentLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(m_cms);
          CmsMessages messages = OpenCms.getWorkplaceManager().getMessages(currentLocale);
          String resTypeNiceName = messages.key(key);
          infos.add(
              new CmsAdditionalInfoBean(
                  messages.key(org.opencms.workplace.commons.Messages.GUI_LABEL_TYPE_0),
                  resTypeNiceName,
                  null));
  
          try {
              CmsRelationFilter filter = CmsRelationFilter.relationsFromStructureId(
                  element.getResource().getStructureId()).filterType(CmsRelationType.XSD);
              for (CmsRelation relation : m_cms.readRelations(filter)) {
                  CmsResource target = relation.getTarget(m_cms, CmsResourceFilter.IGNORE_EXPIRATION);
                  String label = Messages.get().getBundle(wpLocale).key(Messages.GUI_ADDINFO_SCHEMA_0);
                  infos.add(new CmsAdditionalInfoBean(label, target.getRootPath(), null));
                  break;
              }
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
  
          CmsResourceState state = element.getResource().getState();
          return new CmsElementSettingsConfig(elementData, state, infos, schema);
      }