modules = $modules; } /** * Returns LanguageService * * @return \TYPO3\CMS\Core\Localization\LanguageService */ protected function getLanguageService() { return $GLOBALS['LANG']; } /** * Returns the current BE user. * * @return FrontendBackendUserAuthentication */ protected function getBackendUser() { return $GLOBALS['BE_USER']; } /***************************************************** * Admin Panel: Deprecated API ****************************************************/ /** * Backwards compatibility method ensuring hook still gets the same content as before * * @deprecated since TYPO3 v9 - remove when hook can be removed * @internal * @return string * @throws \UnexpectedValueException */ public function callDeprecatedHookObject(): string { $moduleContent = ''; if (StateUtility::isOpen()) { foreach ($this->modules as $module) { $moduleContent .= $this->getModule($module); } foreach ( $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_adminpanel.php']['extendAdminPanel'] ?? [] as $className ) { trigger_error( 'The hook $GLOBALS[TYPO3_CONF_VARS][SC_OPTIONS][tslib/class.tslib_adminpanel.php][extendAdminPanel] will be removed in TYPO3 v10.0, register an AdminPanelModule instead.', E_USER_DEPRECATED ); $hookObject = GeneralUtility::makeInstance($className); if (!$hookObject instanceof AdminPanelViewHookInterface) { throw new \UnexpectedValueException( $className . ' must implement interface ' . AdminPanelViewHookInterface::class, 1311942539 ); } $content = $hookObject->extendAdminPanel($moduleContent, $this); if ($content) { $moduleContent .= '