/** * Constructor */ public function __construct() { // Set debug flag for BE development only $this->debug = intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1; // Initializes the backend modules structure for use later. $this->moduleLoader = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader'); $this->moduleLoader->load($GLOBALS['TBE_MODULES']); $this->moduleMenu = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\ModuleMenuView'); $this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer(); $this->pageRenderer->loadScriptaculous('builder,effects,controls,dragdrop'); $this->pageRenderer->loadExtJS(); $this->pageRenderer->enableExtJSQuickTips(); $this->pageRenderer->addJsInlineCode('consoleOverrideWithDebugPanel', '//already done', FALSE); $this->pageRenderer->addExtDirectCode(); // Add default BE javascript $this->js = ''; $this->jsFiles = array('common' => 'js/common.js', 'locallang' => $this->getLocalLangFileName(), 'modernizr' => 'contrib/modernizr/modernizr.min.js', 'swfupload' => 'contrib/swfupload/swfupload.js', 'swfupload.swfobject' => 'contrib/swfupload/plugins/swfupload.swfobject.js', 'swfupload.cookies' => 'contrib/swfupload/plugins/swfupload.cookies.js', 'swfupload.queue' => 'contrib/swfupload/plugins/swfupload.queue.js', 'md5' => 'md5.js', 'toolbarmanager' => 'js/toolbarmanager.js', 'modulemenu' => 'js/modulemenu.js', 'iecompatibility' => 'js/iecompatibility.js', 'flashupload' => 'js/flashupload.js', 'evalfield' => '../t3lib/jsfunc.evalfield.js', 'flashmessages' => '../t3lib/js/extjs/ux/flashmessages.js', 'tabclosemenu' => '../t3lib/js/extjs/ux/ext.ux.tabclosemenu.js', 'notifications' => '../t3lib/js/extjs/notifications.js', 'backend' => 'js/backend.js', 'loginrefresh' => 'js/loginrefresh.js', 'debugPanel' => 'js/extjs/debugPanel.js', 'viewport' => 'js/extjs/viewport.js', 'iframepanel' => 'js/extjs/iframepanel.js', 'backendcontentiframe' => 'js/extjs/backendcontentiframe.js', 'modulepanel' => 'js/extjs/modulepanel.js', 'viewportConfiguration' => 'js/extjs/viewportConfiguration.js', 'util' => '../t3lib/js/extjs/util.js'); if ($this->debug) { unset($this->jsFiles['loginrefresh']); } // Add default BE css $this->css = ''; $this->cssFiles = array(); $this->toolbarItems = array(); $this->initializeCoreToolbarItems(); $this->menuWidth = $this->menuWidthDefault; if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int) $this->menuWidth) { $this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']; } $this->executeHook('constructPostProcess'); }
/** * Constructor */ public function __construct() { // Set debug flag for BE development only $this->debug = (int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1; // Initializes the backend modules structure for use later. $this->moduleLoader = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader'); $this->moduleLoader->load($GLOBALS['TBE_MODULES']); $this->pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer(); $this->pageRenderer->loadScriptaculous('builder,effects,controls,dragdrop'); $this->pageRenderer->loadExtJS(); $this->pageRenderer->loadJquery(NULL, NULL, \TYPO3\CMS\Core\Page\PageRenderer::JQUERY_NAMESPACE_DEFAULT_NOCONFLICT); $this->pageRenderer->enableExtJSQuickTips(); $this->pageRenderer->addJsInlineCode('consoleOverrideWithDebugPanel', '//already done', FALSE); $this->pageRenderer->addExtDirectCode(); // Add default BE javascript $this->js = ''; $this->jsFiles = array('common' => 'sysext/backend/Resources/Public/JavaScript/common.js', 'locallang' => $this->getLocalLangFileName(), 'modernizr' => 'contrib/modernizr/modernizr.min.js', 'md5' => 'sysext/backend/Resources/Public/JavaScript/md5.js', 'toolbarmanager' => 'sysext/backend/Resources/Public/JavaScript/toolbarmanager.js', 'modulemenu' => 'sysext/backend/Resources/Public/JavaScript/modulemenu.js', 'evalfield' => 'sysext/backend/Resources/Public/JavaScript/jsfunc.evalfield.js', 'flashmessages' => 'sysext/backend/Resources/Public/JavaScript/flashmessages.js', 'tabclosemenu' => 'js/extjs/ux/ext.ux.tabclosemenu.js', 'notifications' => 'sysext/backend/Resources/Public/JavaScript/notifications.js', 'backend' => 'sysext/backend/Resources/Public/JavaScript/backend.js', 'loginrefresh' => 'sysext/backend/Resources/Public/JavaScript/loginrefresh.js', 'debugPanel' => 'js/extjs/debugPanel.js', 'viewport' => 'js/extjs/viewport.js', 'iframepanel' => 'sysext/backend/Resources/Public/JavaScript/iframepanel.js', 'backendcontentiframe' => 'js/extjs/backendcontentiframe.js', 'modulepanel' => 'js/extjs/modulepanel.js', 'viewportConfiguration' => 'js/extjs/viewportConfiguration.js', 'util' => 'sysext/backend/Resources/Public/JavaScript/util.js'); if ($this->debug) { unset($this->jsFiles['loginrefresh']); } // Add default BE css $this->pageRenderer->addCssLibrary('contrib/normalize/normalize.css', 'stylesheet', 'all', '', TRUE, TRUE); $this->css = ''; $this->cssFiles = array(); $this->toolbarItems = array(); $this->initializeCoreToolbarItems(); $this->menuWidth = $this->menuWidthDefault; if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int) $this->menuWidth) { $this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']; } $this->executeHook('constructPostProcess'); }
/** * Constructor */ public function __construct() { $this->getLanguageService()->includeLLFile('EXT:lang/locallang_misc.xlf'); $this->backendModuleRepository = GeneralUtility::makeInstance(BackendModuleRepository::class); // Set debug flag for BE development only $this->debug = (int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1; // Initializes the backend modules structure for use later. $this->moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class); $this->moduleLoader->load($GLOBALS['TBE_MODULES']); $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); $this->pageRenderer->loadExtJS(); // included for the module menu JavaScript, please note that this is subject to change $this->pageRenderer->loadJquery(); $this->pageRenderer->addJsInlineCode('consoleOverrideWithDebugPanel', '//already done', false); $this->pageRenderer->addExtDirectCode(); // Add default BE javascript $backendRelPath = ExtensionManagementUtility::extRelPath('backend'); $this->jsFiles = array('locallang' => $this->getLocalLangFileName(), 'md5' => $backendRelPath . 'Resources/Public/JavaScript/md5.js', 'modulemenu' => $backendRelPath . 'Resources/Public/JavaScript/modulemenu.js', 'evalfield' => $backendRelPath . 'Resources/Public/JavaScript/jsfunc.evalfield.js', 'notifications' => $backendRelPath . 'Resources/Public/JavaScript/notifications.js', 'backend' => $backendRelPath . 'Resources/Public/JavaScript/backend.js', 'viewport' => $backendRelPath . 'Resources/Public/JavaScript/extjs/viewport.js', 'iframepanel' => $backendRelPath . 'Resources/Public/JavaScript/iframepanel.js', 'backendcontentiframe' => $backendRelPath . 'Resources/Public/JavaScript/extjs/backendcontentiframe.js', 'viewportConfiguration' => $backendRelPath . 'Resources/Public/JavaScript/extjs/viewportConfiguration.js'); $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LoginRefresh', 'function(LoginRefresh) { LoginRefresh.setLoginFramesetUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('login_frameset')) . '); LoginRefresh.setLogoutUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('logout')) . '); }'); // load Utility class $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Utility'); // load Notification functionality $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Notification'); // load Modals $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal'); // load Legacy CSS Support $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LegacyCssClasses'); // load the storage API and fill the UC into the PersistentStorage, so no additional AJAX call is needed $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Storage', 'function(Storage) { Storage.Persistent.load(' . json_encode($this->getBackendUser()->uc) . '); }'); // load debug console $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DebugConsole'); // Load RSA encryption $rsaEncryptionEncoder = GeneralUtility::makeInstance(RsaEncryptionEncoder::class); $rsaEncryptionEncoder->enableRsaEncryption(true); $this->pageRenderer->addInlineSetting('ShowItem', 'moduleUrl', BackendUtility::getModuleUrl('show_item')); $this->css = ''; $this->initializeToolbarItems(); if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'])) { $this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']; } $this->executeHook('constructPostProcess'); $this->includeLegacyBackendItems(); }
/** * Constructor */ public function __construct() { $this->getLanguageService()->includeLLFile('EXT:lang/Resources/Private/Language/locallang_misc.xlf'); $this->backendModuleRepository = GeneralUtility::makeInstance(BackendModuleRepository::class); $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); // Set debug flag for BE development only $this->debug = (int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1; // Initializes the backend modules structure for use later. $this->moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class); $this->moduleLoader->load($GLOBALS['TBE_MODULES']); $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class); $this->pageRenderer->loadExtJS(); // included for the module menu JavaScript, please note that this is subject to change $this->pageRenderer->loadJquery(); $this->pageRenderer->addExtDirectCode(); // Add default BE javascript $this->jsFiles = ['locallang' => $this->getLocalLangFileName(), 'md5' => 'EXT:backend/Resources/Public/JavaScript/md5.js', 'evalfield' => 'EXT:backend/Resources/Public/JavaScript/jsfunc.evalfield.js', 'backend' => 'EXT:backend/Resources/Public/JavaScript/backend.js']; $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LoginRefresh', 'function(LoginRefresh) { LoginRefresh.setIntervalTime(' . MathUtility::forceIntegerInRange((int) $GLOBALS['TYPO3_CONF_VARS']['BE']['sessionTimeout'] - 60, 60) . '); LoginRefresh.setLoginFramesetUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('login_frameset')) . '); LoginRefresh.setLogoutUrl(' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('logout')) . '); LoginRefresh.initialize(); }'); // load module menu $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ModuleMenu'); // load Toolbar class $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Toolbar'); // load Utility class $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Utility'); // load Notification functionality $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Notification'); // load Modals $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal'); // load the storage API and fill the UC into the PersistentStorage, so no additional AJAX call is needed $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Storage', 'function(Storage) { Storage.Persistent.load(' . json_encode($this->getBackendUser()->uc) . '); }'); // load debug console $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DebugConsole'); // Load RSA encryption $rsaEncryptionEncoder = GeneralUtility::makeInstance(RsaEncryptionEncoder::class); $rsaEncryptionEncoder->enableRsaEncryption(true); $this->pageRenderer->addInlineSetting('ShowItem', 'moduleUrl', BackendUtility::getModuleUrl('show_item')); $this->css = ''; $this->initializeToolbarItems(); $this->executeHook('constructPostProcess'); $this->includeLegacyBackendItems(); }
/** * This loads everything needed for the Context Sensitive Help (CSH) * * @return void */ protected function loadCshJavascript() { $this->pageRenderer->loadExtJS(); $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/contexthelp.js'); $this->pageRenderer->addExtDirectCode(); }
/** * This loads everything needed for the Context Sensitive Help (CSH) * * @return void */ protected function loadCshJavascript() { $this->pageRenderer->loadExtJS(); $this->pageRenderer->addJsFile($this->backPath . '../t3lib/js/extjs/contexthelp.js'); $this->pageRenderer->addExtDirectCode(); }