FluidTYPO3\Fluidcontent\Service\ConfigurationService::buildAllWizardTabGroups PHP Method

buildAllWizardTabGroups() protected method

Scans all folders in $allTemplatePaths for template files, reads information about each file and collects the groups of files into groups of pageTSconfig setup.
protected buildAllWizardTabGroups ( array $allTemplatePaths ) : array
$allTemplatePaths array
return array
    protected function buildAllWizardTabGroups($allTemplatePaths)
    {
        $wizardTabs = array();
        $forms = $this->getContentElementFormInstances();
        foreach ($forms as $extensionKey => $formSet) {
            $formSet = $this->sortObjectsByProperty($formSet, 'options.Fluidcontent.sorting', 'ASC');
            foreach ($formSet as $id => $form) {
                /** @var Form $form */
                $group = $form->getOption(Form::OPTION_GROUP);
                if (TRUE === empty($group)) {
                    $group = 'Content';
                }
                $sanitizedGroup = $this->sanitizeString($group);
                $tabId = $group === $sanitizedGroup ? $group : 'group_' . $sanitizedGroup;
                $wizardTabs[$tabId]['title'] = LocalizationUtility::translate('fluidcontent.newContentWizard.group.' . $group, ExtensionNamingUtility::getExtensionKey($extensionKey));
                if ($wizardTabs[$tabId]['title'] === NULL) {
                    $coreTranslationReference = 'LLL:EXT:backend/Resources/Private/Language/locallang_db_new_content_el.xlf:' . $group;
                    $wizardTabs[$tabId]['title'] = LocalizationUtility::translate($coreTranslationReference, 'backend');
                    if ($wizardTabs[$tabId]['title'] === NULL || $coreTranslationReference == $wizardTabs[$tabId]['title']) {
                        $wizardTabs[$tabId]['title'] = $group;
                    }
                }
                $contentElementId = $form->getOption('contentElementId');
                $elementTsConfig = $this->buildWizardTabItem($tabId, $id, $form, $contentElementId);
                $wizardTabs[$tabId]['elements'][$id] = $elementTsConfig;
                $wizardTabs[$tabId]['key'] = $extensionKey;
            }
        }
        return $wizardTabs;
    }