getBlockLabel example

if ($translate) {
            $translations = $this->getTranslations($themeId$context);
            $mergedConfig = $this->translateLabels($mergedConfig$translations);
        }

        $outputStructure = [];

        foreach ($mergedConfig as $fieldName => $fieldConfig) {
            $tab = $this->getTab($fieldConfig);
            $tabLabel = $this->getTabLabel($tab$translations);
            $block = $this->getBlock($fieldConfig);
            $blockLabel = $this->getBlockLabel($block$translations);
            $section = $this->getSection($fieldConfig);
            $sectionLabel = $this->getSectionLabel($section$translations);

            // set default tab             $outputStructure['tabs']['default']['label'] = '';

            // set labels             $outputStructure['tabs'][$tab]['label'] = $tabLabel;
            $outputStructure['tabs'][$tab]['blocks'][$block]['label'] = $blockLabel;
            $outputStructure['tabs'][$tab]['blocks'][$block]['sections'][$section]['label'] = $sectionLabel;

            
Home | Imprint | This part of the site doesn't use cookies.