Esempio n. 1
0
 /**
  * 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');
 }
 /**
  * Construct
  */
 public function __construct()
 {
     $this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
     $this->pageRenderer->loadJquery();
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/ElementBrowser');
     $this->initialize();
 }
Esempio n. 3
0
 /**
  * Loads all necessary Javascript Files
  *
  * @return void
  */
 protected function loadJavaScripts()
 {
     $this->pageRenderer->loadJquery();
     $this->pageRenderer->loadRequireJsModule('bootstrap');
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');
 }
 /**
  * Render start page with \TYPO3\CMS\Backend\Template\DocumentTemplate and pageTitle
  *
  * @param string $pageTitle title tag of the module. Not required by default, as BE modules are shown in a frame
  * @param bool $loadExtJs specifies whether to load ExtJS library. Defaults to FALSE
  * @param bool $loadExtJsTheme whether to load ExtJS "grey" theme. Defaults to FALSE
  * @param bool $enableExtJsDebug if TRUE, debug version of ExtJS is loaded. Use this for development only
  * @param bool $loadJQuery whether to load jQuery library. Defaults to FALSE
  * @param array $includeCssFiles List of custom CSS file to be loaded
  * @param array $includeJsFiles List of custom JavaScript file to be loaded
  * @param array $addJsInlineLabels Custom labels to add to JavaScript inline labels
  * @param array $includeRequireJsModules List of RequireJS modules to be loaded
  * @param string $jQueryNamespace Store the jQuery object in a specific namespace
  * @return void
  */
 public function render($pageTitle = '', $loadExtJs = false, $loadExtJsTheme = true, $enableExtJsDebug = false, $loadJQuery = false, $includeCssFiles = null, $includeJsFiles = null, $addJsInlineLabels = null, $includeRequireJsModules = null, $jQueryNamespace = null)
 {
     if ($pageTitle) {
         $this->pageRenderer->setTitle($pageTitle);
     }
     if ($loadExtJs) {
         $this->pageRenderer->loadExtJS(true, $loadExtJsTheme);
         if ($enableExtJsDebug) {
             $this->pageRenderer->enableExtJsDebug();
         }
     }
     if ($loadJQuery) {
         $jQueryNamespace = $jQueryNamespace ?: PageRenderer::JQUERY_NAMESPACE_DEFAULT;
         $this->pageRenderer->loadJquery(null, null, $jQueryNamespace);
     }
     // Include custom CSS and JS files
     if (is_array($includeCssFiles) && count($includeCssFiles) > 0) {
         foreach ($includeCssFiles as $addCssFile) {
             $this->pageRenderer->addCssFile($addCssFile);
         }
     }
     if (is_array($includeJsFiles) && count($includeJsFiles) > 0) {
         foreach ($includeJsFiles as $addJsFile) {
             $this->pageRenderer->addJsFile($addJsFile);
         }
     }
     if (is_array($includeRequireJsModules) && count($includeRequireJsModules) > 0) {
         foreach ($includeRequireJsModules as $addRequireJsFile) {
             $this->pageRenderer->loadRequireJsModule($addRequireJsFile);
         }
     }
     // Add inline language labels
     if (is_array($addJsInlineLabels) && count($addJsInlineLabels) > 0) {
         $extensionKey = $this->controllerContext->getRequest()->getControllerExtensionKey();
         foreach ($addJsInlineLabels as $key) {
             $label = LocalizationUtility::translate($key, $extensionKey);
             $this->pageRenderer->addInlineLanguageLabel($key, $label);
         }
     }
 }
Esempio n. 5
0
    /**
     * 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();
    }
Esempio n. 6
0
    /**
     * 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();
    }
    /**
     * Assemble display of list of scheduled tasks
     *
     * @return string Table of pending tasks
     */
    protected function listTasksAction()
    {
        $this->view->setTemplatePathAndFilename($this->backendTemplatePath . 'ListTasks.html');
        // Define display format for dates
        $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
        // Get list of registered classes
        $registeredClasses = $this->getRegisteredClasses();
        // Get list of registered task groups
        $registeredTaskGroups = $this->getRegisteredTaskGroups();
        // add an empty entry for non-grouped tasks
        // add in front of list
        array_unshift($registeredTaskGroups, array('uid' => 0, 'groupName' => ''));
        // Get all registered tasks
        // Just to get the number of entries
        $query = array('SELECT' => '
				tx_scheduler_task.*,
				tx_scheduler_task_group.groupName as taskGroupName,
				tx_scheduler_task_group.description as taskGroupDescription,
				tx_scheduler_task_group.deleted as isTaskGroupDeleted
				', 'FROM' => '
				tx_scheduler_task
				LEFT JOIN tx_scheduler_task_group ON tx_scheduler_task_group.uid = tx_scheduler_task.task_group
				', 'WHERE' => '1=1', 'ORDERBY' => 'tx_scheduler_task_group.sorting');
        $res = $this->getDatabaseConnection()->exec_SELECT_queryArray($query);
        $numRows = $this->getDatabaseConnection()->sql_num_rows($res);
        // No tasks defined, display information message
        if ($numRows == 0) {
            $this->view->setTemplatePathAndFilename($this->backendTemplatePath . 'ListTasksNoTasks.html');
            return $this->view->render();
        } else {
            $this->pageRenderer->loadJquery();
            $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Scheduler/Scheduler');
            $table = array();
            // Header row
            $table[] = '<thead><tr>' . '<th><a href="#" id="checkall" title="' . $this->getLanguageService()->getLL('label.checkAll', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-select') . '</a></th>' . '<th>' . $this->getLanguageService()->getLL('label.id', TRUE) . '</th>' . '<th>' . $this->getLanguageService()->getLL('task', TRUE) . '</th>' . '<th>' . $this->getLanguageService()->getLL('label.type', TRUE) . '</th>' . '<th>' . $this->getLanguageService()->getLL('label.frequency', TRUE) . '</th>' . '<th>' . $this->getLanguageService()->getLL('label.parallel', TRUE) . '</th>' . '<th>' . $this->getLanguageService()->getLL('label.lastExecution', TRUE) . '</th>' . '<th>' . $this->getLanguageService()->getLL('label.nextExecution', TRUE) . '</th>' . '<th></th>' . '</tr></thead>';
            // Loop on all tasks
            $temporaryResult = array();
            while ($row = $this->getDatabaseConnection()->sql_fetch_assoc($res)) {
                if ($row['taskGroupName'] === NULL || $row['isTaskGroupDeleted'] === '1') {
                    $row['taskGroupName'] = '';
                    $row['taskGroupDescription'] = '';
                    $row['task_group'] = 0;
                }
                $temporaryResult[$row['task_group']]['groupName'] = $row['taskGroupName'];
                $temporaryResult[$row['task_group']]['groupDescription'] = $row['taskGroupDescription'];
                $temporaryResult[$row['task_group']]['tasks'][] = $row;
            }
            foreach ($temporaryResult as $taskGroup) {
                if (!empty($taskGroup['groupName'])) {
                    $groupText = '<strong>' . htmlspecialchars($taskGroup['groupName']) . '</strong>';
                    if (!empty($taskGroup['groupDescription'])) {
                        $groupText .= '<br>' . nl2br(htmlspecialchars($taskGroup['groupDescription']));
                    }
                    $table[] = '<tr><td colspan="9">' . $groupText . '</td></tr>';
                }
                foreach ($taskGroup['tasks'] as $schedulerRecord) {
                    // Define action icons
                    $editAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=edit&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:edit', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                    if ((int) $schedulerRecord['disable'] === 1) {
                        $translationKey = 'enable';
                        $spriteIcon = 'actions-edit-unhide';
                    } else {
                        $translationKey = 'disable';
                        $spriteIcon = 'actions-edit-hide';
                    }
                    $toggleHiddenAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=toggleHidden&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:' . $translationKey, TRUE) . '" class="icon">' . IconUtility::getSpriteIcon($spriteIcon) . '</a>';
                    $deleteAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=delete&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" onclick="return confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->getLL('msg.delete')) . ');" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>';
                    $stopAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&CMD=stop&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" onclick="return confirm(' . GeneralUtility::quoteJSvalue($this->getLanguageService()->getLL('msg.stop')) . ');" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:stop', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>';
                    $runAction = '<a class="btn btn-default" href="' . htmlspecialchars($this->moduleUri . '&tx_scheduler[execute][]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->getLL('action.run_task', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('extensions-scheduler-run-task') . '</a>';
                    // Define some default values
                    $lastExecution = '-';
                    $isRunning = FALSE;
                    $showAsDisabled = FALSE;
                    $startExecutionElement = '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>';
                    // Restore the serialized task and pass it a reference to the scheduler object
                    /** @var $task \TYPO3\CMS\Scheduler\Task\AbstractTask|\TYPO3\CMS\Scheduler\ProgressProviderInterface */
                    $task = unserialize($schedulerRecord['serialized_task_object']);
                    $class = get_class($task);
                    if ($class === '__PHP_Incomplete_Class' && preg_match('/^O:[0-9]+:"(?P<classname>.+?)"/', $schedulerRecord['serialized_task_object'], $matches) === 1) {
                        $class = $matches['classname'];
                    }
                    // Assemble information about last execution
                    if (!empty($schedulerRecord['lastexecution_time'])) {
                        $lastExecution = date($dateFormat, $schedulerRecord['lastexecution_time']);
                        if ($schedulerRecord['lastexecution_context'] == 'CLI') {
                            $context = $this->getLanguageService()->getLL('label.cron');
                        } else {
                            $context = $this->getLanguageService()->getLL('label.manual');
                        }
                        $lastExecution .= ' (' . $context . ')';
                    }
                    if ($this->scheduler->isValidTaskObject($task)) {
                        // The task object is valid
                        $labels = array();
                        $name = htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')');
                        $additionalInformation = $task->getAdditionalInformation();
                        if ($task instanceof \TYPO3\CMS\Scheduler\ProgressProviderInterface) {
                            $progress = round(floatval($task->getProgress()), 2);
                            $name .= $this->renderTaskProgressBar($progress);
                        }
                        if (!empty($additionalInformation)) {
                            $name .= '<div class="additional-information"><span title="' . htmlspecialchars($additionalInformation) . '">[' . GeneralUtility::fixed_lgd_cs(htmlspecialchars($additionalInformation), (int) $this->getBackendUser()->uc['titleLen']) . ']</span></div>';
                        }
                        // Check if task currently has a running execution
                        if (!empty($schedulerRecord['serialized_executions'])) {
                            $labels[] = array('class' => 'success', 'text' => $this->getLanguageService()->getLL('status.running'));
                            $isRunning = TRUE;
                        }
                        // Prepare display of next execution date
                        // If task is currently running, date is not displayed (as next hasn't been calculated yet)
                        // Also hide the date if task is disabled (the information doesn't make sense, as it will not run anyway)
                        if ($isRunning || $schedulerRecord['disable']) {
                            $nextDate = '-';
                        } else {
                            $nextDate = date($dateFormat, $schedulerRecord['nextexecution']);
                            if (empty($schedulerRecord['nextexecution'])) {
                                $nextDate = $this->getLanguageService()->getLL('none');
                            } elseif ($schedulerRecord['nextexecution'] < $GLOBALS['EXEC_TIME']) {
                                $labels[] = array('class' => 'warning', 'text' => $this->getLanguageService()->getLL('status.late'), 'description' => $this->getLanguageService()->getLL('status.legend.scheduled'));
                            }
                        }
                        // Get execution type
                        if ($task->getExecution()->getInterval() == 0 && $task->getExecution()->getCronCmd() == '') {
                            $execType = $this->getLanguageService()->getLL('label.type.single');
                            $frequency = '-';
                        } else {
                            $execType = $this->getLanguageService()->getLL('label.type.recurring');
                            if ($task->getExecution()->getCronCmd() == '') {
                                $frequency = $task->getExecution()->getInterval();
                            } else {
                                $frequency = $task->getExecution()->getCronCmd();
                            }
                        }
                        // Get multiple executions setting
                        if ($task->getExecution()->getMultiple()) {
                            $multiple = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:yes');
                        } else {
                            $multiple = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_common.xlf:no');
                        }
                        // Define checkbox
                        $startExecutionElement = '<label class="btn btn-default btn-checkbox"><input type="checkbox" name="tx_scheduler[execute][]" value="' . $schedulerRecord['uid'] . '" id="task_' . $schedulerRecord['uid'] . '"><span class="t3-icon fa"></span></label>';
                        $actions = $editAction . $toggleHiddenAction . $deleteAction;
                        // Check the disable status
                        // Row is shown dimmed if task is disabled, unless it is still running
                        if ($schedulerRecord['disable'] && !$isRunning) {
                            $labels[] = array('class' => 'default', 'text' => $this->getLanguageService()->getLL('status.disabled'));
                            $showAsDisabled = TRUE;
                        }
                        // Show no action links (edit, delete) if task is running
                        if ($isRunning) {
                            $actions = $stopAction;
                        } else {
                            $actions .= $runAction;
                        }
                        // Check if the last run failed
                        if (!empty($schedulerRecord['lastexecution_failure'])) {
                            // Try to get the stored exception object
                            /** @var $exception \Exception */
                            $exception = @unserialize($schedulerRecord['lastexecution_failure']);
                            // If the exception could not be unserialized, issue a default error message
                            if ($exception === FALSE || $exception instanceof \__PHP_Incomplete_Class) {
                                $labelDescription = $this->getLanguageService()->getLL('msg.executionFailureDefault');
                            } else {
                                $labelDescription = sprintf($this->getLanguageService()->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage());
                            }
                            $labels[] = array('class' => 'danger', 'text' => $this->getLanguageService()->getLL('status.failure'), 'description' => $labelDescription);
                        }
                        // Format the execution status,
                        // including failure feedback, if any
                        if ($schedulerRecord['description'] !== '') {
                            $taskName = '<span title="' . htmlspecialchars($schedulerRecord['description']) . '">' . $name . '</span>';
                        } else {
                            $taskName = $name;
                        }
                        $table[] = '<tr class="' . ($showAsDisabled ? 'disabled' : '') . '">' . '<td>' . $startExecutionElement . '</td>' . '<td class="right">' . $schedulerRecord['uid'] . '</td>' . '<td>' . $taskName . ' ' . $this->makeStatusLabel($labels) . '</td>' . '<td>' . $execType . '</td>' . '<td>' . $frequency . '</td>' . '<td>' . $multiple . '</td>' . '<td>' . $lastExecution . '</td>' . '<td>' . $nextDate . '</td>' . '<td nowrap="nowrap"><div class="btn-group" role="group">' . $actions . '</div></td>' . '</tr>';
                    } else {
                        // The task object is not valid
                        // Prepare to issue an error
                        /** @var $flashMessage FlashMessage */
                        $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, sprintf($this->getLanguageService()->getLL('msg.invalidTaskClass'), $class), '', FlashMessage::ERROR);
                        $executionStatusOutput = $flashMessage->render();
                        $table[] = '<tr>' . '<td>' . $startExecutionElement . '</td>' . '<td class="right">' . $schedulerRecord['uid'] . '</td>' . '<td colspan="6">' . $executionStatusOutput . '</td>' . '<td nowrap="nowrap"><div class="btn-group" role="group">' . $deleteAction . '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>' . '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>' . '<span class="btn btn-default disabled">' . IconUtility::getSpriteIcon('empty-empty') . '</span>' . '</div></td>' . '</tr>';
                    }
                }
            }
            $this->getDatabaseConnection()->sql_free_result($res);
            $this->view->assign('table', '<div class="table-fit"><table class="table table-striped table-hover">' . implode(LF, $table) . '</table></div>');
            // Server date time
            $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ' T (e';
            $this->view->assign('now', date($dateFormat) . ', GMT ' . date('P') . ')');
        }
        return $this->view->render();
    }
Esempio n. 8
0
 /**
  * Includes the necessary Javascript function for the clickmenu (context sensitive menus) in the document
  *
  * @return void
  */
 public function getContextMenuCode()
 {
     $this->pageRenderer->loadJquery();
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
 }
 /**
  * Tests whether jQuery is correctly loaded, from the respective CDNs
  *
  * @dataProvider loadJqueryMinifiedFromSourceDataProvider
  * @test
  */
 public function isJqueryLoadedMinifiedFromSourceByDefault($version, $cdn, $regex)
 {
     $this->fixture->loadJquery($version, $cdn);
     $out = $this->fixture->render();
     $this->assertRegExp($regex, $out);
 }
    /**
     * Assemble display of list of scheduled tasks
     *
     * @return string Table of pending tasks
     */
    protected function listTasks()
    {
        // Define display format for dates
        $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
        $content = '';
        // Get list of registered classes
        $registeredClasses = self::getRegisteredClasses();
        // Get list of registered task groups
        $registeredTaskGroups = self::getRegisteredTaskGroups();
        // add an empty entry for non-grouped tasks
        // add in front of list
        array_unshift($registeredTaskGroups, array('uid' => 0, 'groupName' => ''));
        // Get all registered tasks
        // Just to get the number of entries
        $query = array('SELECT' => '*', 'FROM' => 'tx_scheduler_task', 'WHERE' => '1=1', 'ORDERBY' => '');
        $res = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($query);
        $numRows = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
        $GLOBALS['TYPO3_DB']->sql_free_result($res);
        // No tasks defined, display information message
        if ($numRows == 0) {
            /** @var $flashMessage FlashMessage */
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('msg.noTasks'), '', FlashMessage::INFO);
            $content .= $flashMessage->render();
        } else {
            $this->pageRenderer->loadJquery();
            $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Scheduler/Scheduler');
            // Initialise table layout
            $tableLayout = array('table' => array('<table class="t3-table">', '</table>'), '0' => array('tr' => array('<thead><tr>', '</tr></thead>'), 'defCol' => array('<td>', '</td>'), '1' => array('<td style="width: 56px;">', '</td>'), '3' => array('<td colspan="2">', '</td>')), 'defRow' => array('tr' => array('<tr class="db_list_normal">', '</tr>'), 'defCol' => array('<td>', '</td>'), '1' => array('<td class="right">', '</td>'), '2' => array('<td class="right">', '</td>')));
            $disabledTaskRow = array('tr' => array('<tr class="db_list_normal disabled">', '</tr>'), 'defCol' => array('<td>', '</td>'), '1' => array('<td class="right">', '</td>'), '2' => array('<td class="right">', '</td>'));
            $rowWithSpan = array('tr' => array('<tr class="db_list_normal">', '</tr>'), 'defCol' => array('<td>', '</td>'), '1' => array('<td class="right">', '</td>'), '2' => array('<td class="right">', '</td>'), '3' => array('<td colspan="6">', '</td>'));
            $taskGroupRow = array('tr' => array('<tr class="db_list_normal">', '</tr>'), 'defCol' => array('<td>', '</td>'), '0' => array('<td colspan="10">', '</td>'));
            $table = array();
            $tr = 0;
            // Header row
            $table[$tr][] = '<a href="#" id="checkall" title="' . $GLOBALS['LANG']->getLL('label.checkAll', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-select') . '</a>';
            $table[$tr][] = '&nbsp;';
            $table[$tr][] = $GLOBALS['LANG']->getLL('label.id');
            $table[$tr][] = $GLOBALS['LANG']->getLL('task');
            $table[$tr][] = $GLOBALS['LANG']->getLL('label.type');
            $table[$tr][] = $GLOBALS['LANG']->getLL('label.frequency');
            $table[$tr][] = $GLOBALS['LANG']->getLL('label.parallel');
            $table[$tr][] = $GLOBALS['LANG']->getLL('label.lastExecution');
            $table[$tr][] = $GLOBALS['LANG']->getLL('label.nextExecution');
            $tr++;
            foreach ($registeredTaskGroups as $taskGroup) {
                $query = array('SELECT' => '*', 'FROM' => 'tx_scheduler_task', 'WHERE' => 'task_group=' . $taskGroup['uid'], 'ORDERBY' => 'nextexecution');
                $res = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($query);
                $numRows = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                if ($numRows === 0) {
                    continue;
                }
                if ($taskGroup['groupName'] !== '') {
                    $tableLayout[$tr] = $taskGroupRow;
                    $groupText = '<strong>' . htmlspecialchars($taskGroup['groupName']) . '</strong>';
                    if (!empty($taskGroup['description'])) {
                        $groupText .= '<br />' . nl2br(htmlspecialchars($taskGroup['description']));
                    }
                    $table[$tr][] = $groupText;
                    $tr++;
                }
                // Loop on all tasks
                while ($schedulerRecord = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                    // Define action icons
                    $editAction = '<a href="' . $GLOBALS['MCONF']['_'] . '&CMD=edit&tx_scheduler[uid]=' . $schedulerRecord['uid'] . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:edit', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>';
                    $deleteAction = '<a href="' . $GLOBALS['MCONF']['_'] . '&CMD=delete&tx_scheduler[uid]=' . $schedulerRecord['uid'] . '" onclick="return confirm(\'' . $GLOBALS['LANG']->getLL('msg.delete') . '\');" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:delete', TRUE) . '" class="icon">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>';
                    $stopAction = '<a href="' . $GLOBALS['MCONF']['_'] . '&CMD=stop&tx_scheduler[uid]=' . $schedulerRecord['uid'] . '" onclick="return confirm(\'' . $GLOBALS['LANG']->getLL('msg.stop') . '\');" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:stop', TRUE) . '" class="icon">' . '<img ' . IconUtility::skinImg($this->backPath, ExtensionManagementUtility::extRelPath('scheduler') . '/Resources/Public/Images/stop.png') . ' alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:stop') . '" /></a>';
                    $runAction = '<a href="' . $GLOBALS['MCONF']['_'] . '&tx_scheduler[execute][]=' . $schedulerRecord['uid'] . '" title="' . $GLOBALS['LANG']->getLL('action.run_task') . '" class="icon">' . IconUtility::getSpriteIcon('extensions-scheduler-run-task') . '</a>';
                    // Define some default values
                    $lastExecution = '-';
                    $isRunning = FALSE;
                    $executionStatus = 'scheduled';
                    $executionStatusOutput = '';
                    $name = '';
                    $nextDate = '-';
                    $execType = '-';
                    $frequency = '-';
                    $multiple = '-';
                    $startExecutionElement = '&nbsp;';
                    // Restore the serialized task and pass it a reference to the scheduler object
                    /** @var $task \TYPO3\CMS\Scheduler\Task\AbstractTask|\TYPO3\CMS\Scheduler\ProgressProviderInterface */
                    $task = unserialize($schedulerRecord['serialized_task_object']);
                    $class = get_class($task);
                    if ($class === '__PHP_Incomplete_Class' && preg_match('/^O:[0-9]+:"(?P<classname>.+?)"/', $schedulerRecord['serialized_task_object'], $matches) === 1) {
                        $class = $matches['classname'];
                    }
                    // Assemble information about last execution
                    $context = '';
                    if (!empty($schedulerRecord['lastexecution_time'])) {
                        $lastExecution = date($dateFormat, $schedulerRecord['lastexecution_time']);
                        if ($schedulerRecord['lastexecution_context'] == 'CLI') {
                            $context = $GLOBALS['LANG']->getLL('label.cron');
                        } else {
                            $context = $GLOBALS['LANG']->getLL('label.manual');
                        }
                        $lastExecution .= ' (' . $context . ')';
                    }
                    if ($this->scheduler->isValidTaskObject($task)) {
                        // The task object is valid
                        $name = htmlspecialchars($registeredClasses[$class]['title'] . ' (' . $registeredClasses[$class]['extension'] . ')');
                        $additionalInformation = $task->getAdditionalInformation();
                        if ($task instanceof \TYPO3\CMS\Scheduler\ProgressProviderInterface) {
                            $progress = round(floatval($task->getProgress()), 2);
                            $name .= '<br />' . $this->renderTaskProgressBar($progress);
                        }
                        if (!empty($additionalInformation)) {
                            $name .= '<br />[' . htmlspecialchars($additionalInformation) . ']';
                        }
                        // Check if task currently has a running execution
                        if (!empty($schedulerRecord['serialized_executions'])) {
                            $isRunning = TRUE;
                            $executionStatus = 'running';
                        }
                        // Prepare display of next execution date
                        // If task is currently running, date is not displayed (as next hasn't been calculated yet)
                        // Also hide the date if task is disabled (the information doesn't make sense, as it will not run anyway)
                        if ($isRunning || $schedulerRecord['disable'] == 1) {
                            $nextDate = '-';
                        } else {
                            $nextDate = date($dateFormat, $schedulerRecord['nextexecution']);
                            if (empty($schedulerRecord['nextexecution'])) {
                                $nextDate = $GLOBALS['LANG']->getLL('none');
                            } elseif ($schedulerRecord['nextexecution'] < $GLOBALS['EXEC_TIME']) {
                                // Next execution is overdue, highlight date
                                $nextDate = '<span class="late" title="' . $GLOBALS['LANG']->getLL('status.legend.scheduled') . '">' . $nextDate . '</span>';
                                $executionStatus = 'late';
                            }
                        }
                        // Get execution type
                        if ($task->getExecution()->getInterval() == 0 && $task->getExecution()->getCronCmd() == '') {
                            $execType = $GLOBALS['LANG']->getLL('label.type.single');
                            $frequency = '-';
                        } else {
                            $execType = $GLOBALS['LANG']->getLL('label.type.recurring');
                            if ($task->getExecution()->getCronCmd() == '') {
                                $frequency = $task->getExecution()->getInterval();
                            } else {
                                $frequency = $task->getExecution()->getCronCmd();
                            }
                        }
                        // Get multiple executions setting
                        if ($task->getExecution()->getMultiple()) {
                            $multiple = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:yes');
                        } else {
                            $multiple = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:no');
                        }
                        // Define checkbox
                        $startExecutionElement = '<input type="checkbox" name="tx_scheduler[execute][]" value="' . $schedulerRecord['uid'] . '" id="task_' . $schedulerRecord['uid'] . '" class="checkboxes" />';
                        $actions = $editAction . $deleteAction;
                        // Check the disable status
                        // Row is shown dimmed if task is disabled, unless it is still running
                        if ($schedulerRecord['disable'] == 1 && !$isRunning) {
                            $tableLayout[$tr] = $disabledTaskRow;
                            $executionStatus = 'disabled';
                        }
                        // Show no action links (edit, delete) if task is running
                        if ($isRunning) {
                            $actions = $stopAction;
                        } else {
                            $actions .= $runAction;
                        }
                        // Check if the last run failed
                        $failureOutput = '';
                        if (!empty($schedulerRecord['lastexecution_failure'])) {
                            // Try to get the stored exception object
                            /** @var $exception \Exception */
                            $exception = unserialize($schedulerRecord['lastexecution_failure']);
                            // If the exception could not be unserialized, issue a default error message
                            if ($exception === FALSE || $exception instanceof \__PHP_Incomplete_Class) {
                                $failureDetail = $GLOBALS['LANG']->getLL('msg.executionFailureDefault');
                            } else {
                                $failureDetail = sprintf($GLOBALS['LANG']->getLL('msg.executionFailureReport'), $exception->getCode(), $exception->getMessage());
                            }
                            $failureOutput = ' <img ' . IconUtility::skinImg(ExtensionManagementUtility::extRelPath('scheduler'), 'Resources/Public/Images/status_failure.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.failure')) . '" title="' . htmlspecialchars($failureDetail) . '" />';
                        }
                        // Format the execution status,
                        // including failure feedback, if any
                        $executionStatusOutput = '<img ' . IconUtility::skinImg(ExtensionManagementUtility::extRelPath('scheduler'), 'Resources/Public/Images/status_' . $executionStatus . '.png') . ' id="executionstatus_' . $schedulerRecord['uid'] . '" alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.' . $executionStatus)) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.legend.' . $executionStatus)) . '" />' . $failureOutput;
                        $table[$tr][] = $startExecutionElement;
                        $table[$tr][] = $actions;
                        $table[$tr][] = $schedulerRecord['uid'];
                        $table[$tr][] = $executionStatusOutput;
                        if ($schedulerRecord['description'] !== '') {
                            if (!empty($this->scheduler->extConf['listShowTaskDescriptionAsHover'])) {
                                $table[$tr][] = '<span title="' . htmlspecialchars($schedulerRecord['description']) . '">' . $name . '</span>';
                            } else {
                                $table[$tr][] = $name . '<br />' . nl2br(htmlspecialchars($schedulerRecord['description'])) . '<br />';
                            }
                        } else {
                            $table[$tr][] = $name;
                        }
                        $table[$tr][] = $execType;
                        $table[$tr][] = $frequency;
                        $table[$tr][] = $multiple;
                        $table[$tr][] = $lastExecution;
                        $table[$tr][] = $nextDate;
                    } else {
                        // The task object is not valid
                        // Prepare to issue an error
                        /** @var $flashMessage FlashMessage */
                        $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('msg.invalidTaskClass'), $class), '', FlashMessage::ERROR);
                        $executionStatusOutput = $flashMessage->render();
                        $tableLayout[$tr] = $rowWithSpan;
                        $table[$tr][] = $startExecutionElement;
                        $table[$tr][] = $deleteAction;
                        $table[$tr][] = $schedulerRecord['uid'];
                        $table[$tr][] = $executionStatusOutput;
                    }
                    $tr++;
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
            }
            // Render table
            $content .= $this->doc->table($table, $tableLayout);
            $content .= '<button name="go" id="scheduler_executeselected">' . IconUtility::getSpriteIcon('extensions-scheduler-run-task') . ' ' . $GLOBALS['LANG']->getLL('label.executeSelected') . '</button>';
        }
        if (!count($registeredClasses) > 0) {
            /** @var $flashMessage FlashMessage */
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('msg.noTasksDefined'), '', FlashMessage::INFO);
            $content .= $flashMessage->render();
        }
        // Display legend, if there's at least one registered task
        // Also display information about the usage of server time
        if ($numRows > 0) {
            $content .= $this->doc->spacer(20);
            $extensionRelativePath = ExtensionManagementUtility::extRelPath('scheduler');
            $content .= '<h3>' . $GLOBALS['LANG']->getLL('status.legend') . '</h3>
			<ul>
				<li><img ' . IconUtility::skinImg($extensionRelativePath, 'Resources/Public/Images/status_failure.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.failure')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.failure')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.failure') . '</li>
				<li><img ' . IconUtility::skinImg($extensionRelativePath, 'Resources/Public/Images/status_late.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.late')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.late')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.late') . '</li>
				<li><img ' . IconUtility::skinImg($extensionRelativePath, 'Resources/Public/Images/status_running.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.running')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.running')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.running') . '</li>
				<li><img ' . IconUtility::skinImg($extensionRelativePath, 'Resources/Public/Images/status_scheduled.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.scheduled')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.scheduled')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.scheduled') . '</li>
				<li><img ' . IconUtility::skinImg($extensionRelativePath, 'Resources/Public/Images/status_disabled.png') . ' alt="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.disabled')) . '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('status.disabled')) . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.disabled') . '</li>
			</ul>';
            $content .= $this->displayServerTime();
        }
        return $content;
    }
Esempio n. 11
0
 /**
  * Construct
  */
 public function __construct()
 {
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $this->fileRepository = GeneralUtility::makeInstance(FileRepository::class);
     $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
     $this->pageRenderer->loadJquery();
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/FieldSelectBox');
 }
Esempio n. 12
0
 /**
  * Includes the necessary Javascript function for the clickmenu (context sensitive menus) in the document
  *
  * @return void
  * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
  */
 public function getContextMenuCode()
 {
     GeneralUtility::logDeprecatedFunction();
     $this->pageRenderer->loadJquery();
     $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
 }