getTSConfig()['admPanel.'] ?? []; if (isset($adminPanelConfiguration['enable.'])) { // only enabled if at least one module is enabled. return (bool)array_filter($adminPanelConfiguration['enable.']); } } return false; } /** * Returns true if admin panel was activated * (switched "on" via GUI) * * @return bool */ public static function isOpen(): bool { $beUser = $GLOBALS['BE_USER'] ?? null; return (bool)($beUser->uc['AdminPanel']['display_top'] ?? false); } public static function isActivatedInTypoScript(): bool { return (bool)($GLOBALS['TSFE']->config['config']['admPanel'] ?? false); } public static function isHiddenForUser(): bool { $beUser = $GLOBALS['BE_USER'] ?? null; return $beUser ? (bool)($beUser->getTSConfig()['admPanel.']['hide'] ?? false) : false; } }