CodeExplorer getTab example
$mergedConfig =
$this->
getThemeConfiguration($themeId,
$translate,
$context)['fields'
];
$translations =
[];
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;