当前位置: 首页>>代码示例>>PHP>>正文


PHP PageRenderer::loadExtJS方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Page\PageRenderer::loadExtJS方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::loadExtJS方法的具体用法?PHP PageRenderer::loadExtJS怎么用?PHP PageRenderer::loadExtJS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Page\PageRenderer的用法示例。


在下文中一共展示了PageRenderer::loadExtJS方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * 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');
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:35,代码来源:BackendController.php

示例2: __construct

 /**
  * 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');
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:34,代码来源:BackendController.php

示例3: main

    /**
     * Main function of the module. Write the content to $this->content
     * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
        $PATH_TYPO3 = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'typo3/';
        if ($BE_USER->user["admin"]) {
            // Draw the header.
            $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance("template");
            $this->doc->backPath = $BACK_PATH;
            $this->pageRenderer = $this->doc->getPageRenderer();
            // Include Ext JS
            $this->pageRenderer->loadExtJS(true, true);
            $this->pageRenderer->enableExtJSQuickTips();
            $this->pageRenderer->enableExtJsDebug();
            $this->pageRenderer->addJsFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('caretaker') . 'res/js/tx.caretaker.js', 'text/javascript', FALSE, FALSE);
            $this->pageRenderer->addJsFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('caretaker') . 'res/js/tx.caretaker.NodeTree.js', 'text/javascript', FALSE, FALSE);
            //Add caretaker css
            $this->pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('caretaker') . 'res/css/tx.caretaker.nodetree.css', 'stylesheet', 'all', '', FALSE);
            // storage Pid
            $confArray = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker']);
            $storagePid = (int) $confArray['storagePid'];
            $this->pageRenderer->addJsInlineCode('Caretaker_Nodetree', '
			Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
			Ext.ns("tx.caretaker");
			Ext.onReady(function() {
				tx.caretaker.view = new Ext.Viewport({
					layout: "fit",
					items: {
						id: "cartaker-tree",
						xtype: "caretaker-nodetree",
						autoScroll: true,
						dataUrl: TYPO3.settings.ajaxUrls[\'tx_caretaker::treeloader\'],
						addUrl: "' . $PATH_TYPO3 . 'alt_doc.php?edit[###NODE_TYPE###][' . $storagePid . ']=new",
						editUrl: "' . $PATH_TYPO3 . 'alt_doc.php?edit[tx_caretaker_###NODE_TYPE###][###NODE_UID###]=edit",
						hideUrl: "' . $PATH_TYPO3 . 'tce_db.php?&data[tx_caretaker_###NODE_TYPE###][###NODE_UID###][hidden]=1",
						unhideUrl: "' . $PATH_TYPO3 . 'tce_db.php?&data[tx_caretaker_###NODE_TYPE###][###NODE_UID###][hidden]=0"
					}
				});

				tx_caretaker_updateTreeById = function( id ){
					tx_caretaker_tree = Ext.getCmp("cartaker-tree");
					tx_caretaker_tree.reloadTreePartial( id );
				}
			});
			');
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->doc->form = '';
        } else {
            // If no access or if not admin
            $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\MediumDocumentTemplate');
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL("title"));
            $this->content .= $this->doc->header($LANG->getLL("title"));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
开发者ID:sfsmfc,项目名称:caretaker,代码行数:60,代码来源:index.php

示例4: testAddInlineSettingArrayMerged

 /**
  * test inline settings with array get merged
  */
 public function testAddInlineSettingArrayMerged()
 {
     $expectedReturnValue = 'TYPO3.settings = {"myApp":{"myKey1":"myValue1","myKey2":"myValue2"}};';
     $this->fixture->loadExtJS();
     $this->fixture->addInlineSettingArray('myApp', array('myKey1' => 'myValue1'));
     $this->fixture->addInlineSettingArray('myApp', array('myKey2' => 'myValue2'));
     $this->fixture->enableMoveJsFromHeaderToFooter();
     $out = $this->fixture->render(\TYPO3\CMS\Core\Page\PageRenderer::PART_FOOTER);
     $this->assertContains($expectedReturnValue, $out);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:13,代码来源:PageRendererTest.php

示例5: render

 /**
  * @param string $table
  * @param array|string $data
  * @return string
  */
 public function render($table = NULL, $data = NULL)
 {
     if (!$data) {
         $data = array();
     }
     if ($table) {
         if (!$data['uid']) {
             $data['uid'] = "none";
         }
         if (!$data['pid']) {
             $data['pid'] = "0";
         }
         $this->pageRenderer->loadPrototype();
         $this->pageRenderer->loadExtJS();
         $this->tceforms = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
         $this->tceforms->initDefaultBEMode();
         // EXTBASE FORMS
         $this->tceforms->prependFormFieldNames = $this->getFieldNamePrefix();
         $this->tceforms->formName = $table;
         $this->tceforms->totalWrap = '<div class="typo3-TCEforms"> |  </div>';
         $this->tceforms->doSaveFieldName = 'doSave';
         $this->tceforms->localizationMode = GeneralUtility::inList('text,media', $this->localizationMode) ? $this->localizationMode : '';
         $this->tceforms->returnUrl = $this->R_URI;
         $this->tceforms->palettesCollapsed = !$this->MOD_SETTINGS['showPalettes'];
         $this->tceforms->disableRTE = !$GLOBALS['BE_USER']->isRTE();
         $this->tceforms->enableClickMenu = TRUE;
         $this->tceforms->enableTabMenu = TRUE;
         $panel = $this->tceforms->getMainFields($table, $data);
         $body = $this->tceforms->printNeededJSFunctions_top();
         $body .= $this->tceforms->wrapTotal($panel, $data, $table);
         $body .= $this->tceforms->printNeededJSFunctions();
         if (count($this->tceforms->commentMessages)) {
             $body .= '
                 <!-- TCEFORM messages
                 ' . htmlspecialchars(implode(LF, $this->tceforms->commentMessages)) . '
                 -->
             ';
         }
     } else {
         return "Tabelle wurde nicht angegeben.";
     }
     return $body;
 }
开发者ID:woehrlag,项目名称:new.woehrl.de,代码行数:48,代码来源:FormEngineViewHelper.php

示例6: loadJavascript

 /**
  * Load the necessarry javascript
  *
  * This will only be done when the referenced record is available
  *
  * @return void
  */
 protected function loadJavascript()
 {
     $compress = TRUE;
     $javascriptFiles = array('Initialize.js', 'Ux/Ext.ux.merge.js', 'Ux/Ext.ux.isemptyobject.js', 'Ux/Ext.ux.spinner.js', 'Ux/Ext.ux.form.spinnerfield.js', 'Ux/Ext.ux.form.textfieldsubmit.js', 'Ux/Ext.ux.grid.CheckColumn.js', 'Ux/Ext.ux.grid.SingleSelectCheckColumn.js', 'Ux/Ext.ux.grid.ItemDeleter.js', 'Helpers/History.js', 'Helpers/Element.js', 'Elements/ButtonGroup.js', 'Elements/Container.js', 'Elements/Elements.js', 'Elements/Dummy.js', 'Elements/Basic/Button.js', 'Elements/Basic/Checkbox.js', 'Elements/Basic/Fieldset.js', 'Elements/Basic/Fileupload.js', 'Elements/Basic/Form.js', 'Elements/Basic/Hidden.js', 'Elements/Basic/Password.js', 'Elements/Basic/Radio.js', 'Elements/Basic/Reset.js', 'Elements/Basic/Select.js', 'Elements/Basic/Submit.js', 'Elements/Basic/Textarea.js', 'Elements/Basic/Textline.js', 'Elements/Predefined/Email.js', 'Elements/Predefined/CheckboxGroup.js', 'Elements/Predefined/Name.js', 'Elements/Predefined/RadioGroup.js', 'Elements/Content/Header.js', 'Elements/Content/Textblock.js', 'Viewport.js', 'Viewport/Left.js', 'Viewport/Right.js', 'Viewport/Left/Elements.js', 'Viewport/Left/Elements/ButtonGroup.js', 'Viewport/Left/Elements/Basic.js', 'Viewport/Left/Elements/Predefined.js', 'Viewport/Left/Elements/Content.js', 'Viewport/Left/Options.js', 'Viewport/Left/Options/Dummy.js', 'Viewport/Left/Options/Panel.js', 'Viewport/Left/Options/Forms/Attributes.js', 'Viewport/Left/Options/Forms/Label.js', 'Viewport/Left/Options/Forms/Legend.js', 'Viewport/Left/Options/Forms/Options.js', 'Viewport/Left/Options/Forms/Various.js', 'Viewport/Left/Options/Forms/Filters.js', 'Viewport/Left/Options/Forms/Filters/Filter.js', 'Viewport/Left/Options/Forms/Filters/Dummy.js', 'Viewport/Left/Options/Forms/Filters/Alphabetic.js', 'Viewport/Left/Options/Forms/Filters/Alphanumeric.js', 'Viewport/Left/Options/Forms/Filters/Currency.js', 'Viewport/Left/Options/Forms/Filters/Digit.js', 'Viewport/Left/Options/Forms/Filters/Integer.js', 'Viewport/Left/Options/Forms/Filters/LowerCase.js', 'Viewport/Left/Options/Forms/Filters/RegExp.js', 'Viewport/Left/Options/Forms/Filters/RemoveXSS.js', 'Viewport/Left/Options/Forms/Filters/StripNewLines.js', 'Viewport/Left/Options/Forms/Filters/TitleCase.js', 'Viewport/Left/Options/Forms/Filters/Trim.js', 'Viewport/Left/Options/Forms/Filters/UpperCase.js', 'Viewport/Left/Options/Forms/Validation.js', 'Viewport/Left/Options/Forms/Validation/Rule.js', 'Viewport/Left/Options/Forms/Validation/Dummy.js', 'Viewport/Left/Options/Forms/Validation/Alphabetic.js', 'Viewport/Left/Options/Forms/Validation/Alphanumeric.js', 'Viewport/Left/Options/Forms/Validation/Between.js', 'Viewport/Left/Options/Forms/Validation/Date.js', 'Viewport/Left/Options/Forms/Validation/Digit.js', 'Viewport/Left/Options/Forms/Validation/Email.js', 'Viewport/Left/Options/Forms/Validation/Equals.js', 'Viewport/Left/Options/Forms/Validation/FileAllowedTypes.js', 'Viewport/Left/Options/Forms/Validation/FileMaximumSize.js', 'Viewport/Left/Options/Forms/Validation/FileMinimumSize.js', 'Viewport/Left/Options/Forms/Validation/Float.js', 'Viewport/Left/Options/Forms/Validation/GreaterThan.js', 'Viewport/Left/Options/Forms/Validation/InArray.js', 'Viewport/Left/Options/Forms/Validation/Integer.js', 'Viewport/Left/Options/Forms/Validation/Ip.js', 'Viewport/Left/Options/Forms/Validation/Length.js', 'Viewport/Left/Options/Forms/Validation/LessThan.js', 'Viewport/Left/Options/Forms/Validation/RegExp.js', 'Viewport/Left/Options/Forms/Validation/Required.js', 'Viewport/Left/Options/Forms/Validation/Uri.js', 'Viewport/Left/Form.js', 'Viewport/Left/Form/Behaviour.js', 'Viewport/Left/Form/Attributes.js', 'Viewport/Left/Form/Prefix.js', 'Viewport/Left/Form/PostProcessor.js', 'Viewport/Left/Form/PostProcessors/PostProcessor.js', 'Viewport/Left/Form/PostProcessors/Dummy.js', 'Viewport/Left/Form/PostProcessors/Mail.js', 'Viewport/Left/Form/PostProcessors/Redirect.js');
     // Load ExtJS
     $this->pageRenderer->loadExtJS();
     // Load the wizards javascript
     $baseUrl = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('form') . 'Resources/Public/JavaScript/Wizard/';
     foreach ($javascriptFiles as $javascriptFile) {
         $this->pageRenderer->addJsFile($baseUrl . $javascriptFile, 'text/javascript', $compress, FALSE);
     }
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:19,代码来源:WizardView.php

示例7: render

 /**
  * 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);
         }
     }
 }
开发者ID:rickymathew,项目名称:TYPO3.CMS,代码行数:55,代码来源:PageRendererViewHelper.php

示例8: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->pageId = (int) GeneralUtility::_GP('id');
     $this->pageRenderer->addInlineLanguageLabelArray(array('title' => $this->languageService->getLL('title'), 'path' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.path'), 'table' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.table'), 'depth' => $this->languageService->sL('LLL:EXT:lang/locallang_mod_web_perm.xml:Depth'), 'depth_0' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'), 'depth_1' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'), 'depth_2' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'), 'depth_3' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'), 'depth_4' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_4'), 'depth_infi' => $this->languageService->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi')));
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:typo3_forum/Resources/Private/Language/locallang_mod.xml');
     $this->pageRenderer->loadExtJS();
     $this->pageRenderer->enableExtJSQuickTips();
     $this->pageRenderer->addJsFile(ExtensionManagementUtility::extRelPath('lang') . 'res/js/be/typo3lang.js');
     $this->pageRenderer->addJsFile($this->backPath . 'js/extjs/ux/Ext.ux.FitToParent.js');
     $this->includeJavascriptFromPath('Resources/Public/Javascript/Backend/ExtJS/');
     $this->includeJavascriptFromPath('Resources/Public/Javascript/Backend/ForumIndex/');
     $this->includeCssFromPath('Resources/Public/Javascript/Backend/ExtJS/');
     $this->pageRenderer->addCssFile(ExtensionManagementUtility::extRelPath('typo3_forum') . 'Resources/Public/Stylesheets/typo3_forum-backend.css');
 }
开发者ID:steffmeister,项目名称:typo3-forum,代码行数:19,代码来源:AbstractBackendController.php

示例9: __construct

    /**
     * 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();
    }
开发者ID:burguin,项目名称:test01,代码行数:51,代码来源:BackendController.php

示例10: loadHeaderData

 /**
  * Loads data in the HTML head section (e.g. JavaScript or stylesheet information).
  *
  * @return 	void
  */
 protected function loadHeaderData()
 {
     // Load CSS Stylesheets:
     $this->pageRenderer->addCssFile($this->relativePath . 'res/css/customExtJs.css');
     // Load Ext JS:
     $this->pageRenderer->loadExtJS();
     $this->pageRenderer->enableExtJSQuickTips();
     // Integrate dynamic JavaScript such as configuration or lables:
     $this->pageRenderer->addInlineSettingArray('Recycler', $this->getJavaScriptConfiguration());
     $this->pageRenderer->addInlineLanguageLabelArray($this->getJavaScriptLabels());
     // Load Recycler JavaScript:
     // Load Plugins
     $uxPath = $this->doc->backpath . 'js/extjs/ux/';
     $this->pageRenderer->addJsFile($uxPath . 'Ext.grid.RowExpander.js');
     $this->pageRenderer->addJsFile($uxPath . 'Ext.app.SearchField.js');
     $this->pageRenderer->addJsFile($uxPath . 'Ext.ux.FitToParent.js');
     // Load main script
     $this->pageRenderer->addJsFile($this->relativePath . 'res/js/t3_recycler.js');
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:24,代码来源:RecyclerModuleController.php

示例11: collapseableSection

    /**
     * Makes a collapseable section. See reports module for an example
     *
     * @param string $title
     * @param string $html
     * @param string $id
     * @param string $saveStatePointer
     * @return string
     * @deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8. Use HTML bootstrap classes, localStorage etc.
     */
    public function collapseableSection($title, $html, $id, $saveStatePointer = '')
    {
        GeneralUtility::logDeprecatedFunction();
        $hasSave = (bool) $saveStatePointer;
        $collapsedStyle = $collapsedClass = '';
        if ($hasSave) {
            /** @var $userSettingsController \TYPO3\CMS\Backend\Controller\UserSettingsController */
            $userSettingsController = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Controller\UserSettingsController::class);
            $value = $userSettingsController->process('get', $saveStatePointer . '.' . $id);
            if ($value) {
                $collapsedStyle = ' style="display: none"';
                $collapsedClass = ' collapsed';
            } else {
                $collapsedStyle = '';
                $collapsedClass = ' expanded';
            }
        }
        $this->pageRenderer->loadExtJS();
        $this->pageRenderer->addExtOnReadyCode('
			Ext.select("h2.section-header").each(function(element){
				element.on("click", function(event, tag) {
					var state = 0,
						el = Ext.fly(tag),
						div = el.next("div"),
						saveKey = el.getAttribute("rel");
					if (el.hasClass("collapsed")) {
						el.removeClass("collapsed").addClass("expanded");
						div.slideIn("t", {
							easing: "easeIn",
							duration: .5
						});
					} else {
						el.removeClass("expanded").addClass("collapsed");
						div.slideOut("t", {
							easing: "easeOut",
							duration: .5,
							remove: false,
							useDisplay: true
						});
						state = 1;
					}
					if (saveKey) {
						try {
							top.TYPO3.Storage.Persistent.set(saveKey + "." + tag.id, state);
						} catch(e) {}
					}
				});
			});
		');
        return '
		  <h2 id="' . $id . '" class="section-header' . $collapsedClass . '" rel="' . $saveStatePointer . '"> ' . $title . '</h2>
		  <div' . $collapsedStyle . '>' . $html . '</div>
		';
    }
开发者ID:burguin,项目名称:test01,代码行数:64,代码来源:DocumentTemplate.php

示例12: collapseableSection

    /**
     * Makes a collapseable section. See reports module for an example
     *
     * @param string $title
     * @param string $html
     * @param string $id
     * @param string $saveStatePointer
     * @return string
     */
    public function collapseableSection($title, $html, $id, $saveStatePointer = '')
    {
        $hasSave = $saveStatePointer ? TRUE : FALSE;
        $collapsedStyle = $collapsedClass = '';
        if ($hasSave) {
            /** @var $settings \TYPO3\CMS\Backend\User\ExtDirect\BackendUserSettingsDataProvider */
            $settings = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\User\\ExtDirect\\BackendUserSettingsDataProvider');
            $value = $settings->get($saveStatePointer . '.' . $id);
            if ($value) {
                $collapsedStyle = ' style="display: none"';
                $collapsedClass = ' collapsed';
            } else {
                $collapsedStyle = '';
                $collapsedClass = ' expanded';
            }
        }
        $this->pageRenderer->loadExtJS();
        $this->pageRenderer->addExtOnReadyCode('
			Ext.select("h2.section-header").each(function(element){
				element.on("click", function(event, tag) {
					var state = 0,
						el = Ext.fly(tag),
						div = el.next("div"),
						saveKey = el.getAttribute("rel");
					if (el.hasClass("collapsed")) {
						el.removeClass("collapsed").addClass("expanded");
						div.slideIn("t", {
							easing: "easeIn",
							duration: .5
						});
					} else {
						el.removeClass("expanded").addClass("collapsed");
						div.slideOut("t", {
							easing: "easeOut",
							duration: .5,
							remove: false,
							useDisplay: true
						});
						state = 1;
					}
					if (saveKey) {
						try {
							top.TYPO3.BackendUserSettings.ExtDirect.set(saveKey + "." + tag.id, state, function(response) {});
						} catch(e) {}
					}
				});
			});
		');
        return '
		  <h2 id="' . $id . '" class="section-header' . $collapsedClass . '" rel="' . $saveStatePointer . '"> ' . $title . '</h2>
		  <div' . $collapsedStyle . '>' . $html . '</div>
		';
    }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:62,代码来源:DocumentTemplate.php

示例13: main

    /**
     * Main function of the module. Write the content to $this->content
     * If you chose "web" as main module, you will need to consider the $this->id parameter which will contain the uid-number of the page clicked in the page tree
     *
     * @return void
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
        $PATH_TYPO3 = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'typo3/';
        if ($BE_USER->user["admin"]) {
            // find node
            $node_repository = tx_caretaker_NodeRepository::getInstance();
            $node = $node_repository->id2node($this->node_id, true);
            if (!$node) {
                $node = $node_repository->getRootNode();
            }
            // Draw the header.
            $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
            $this->doc->backPath = $BACK_PATH;
            $this->pageRenderer = $this->doc->getPageRenderer();
            // Include Ext JS
            $this->pageRenderer->loadExtJS();
            $this->pageRenderer->addJsFile($BACK_PATH . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('caretaker') . 'res/js/tx.caretaker.js');
            $panels = array();
            foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['caretaker']['extJsBackendPanels'] as $extJsBackendPanel) {
                // register JS
                foreach ($extJsBackendPanel['jsIncludes'] as $jsInclude) {
                    $filename = $BACK_PATH . '../' . str_replace(PATH_site, '', \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($jsInclude));
                    $this->pageRenderer->addJsFile($filename);
                }
                // register CSS
                foreach ($extJsBackendPanel['cssIncludes'] as $cssInclude) {
                    $filename = $BACK_PATH . '../' . str_replace(PATH_site, '', \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($cssInclude));
                    $this->pageRenderer->addCssFile($filename);
                }
                // add ExtJs Panel
                $panels[$extJsBackendPanel['id']] = $extJsBackendPanel['xtype'];
            }
            $this->pageRenderer->addJsFile($BACK_PATH . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('caretaker') . 'res/js/tx.caretaker.NodeToolbar.js');
            // Enable debug mode for Ext JS
            $this->pageRenderer->enableExtJsDebug();
            // storage Pid
            $confArray = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['caretaker']);
            $storagePid = (int) $confArray['storagePid'];
            //Add caretaker css
            $this->pageRenderer->addCssFile($BACK_PATH . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('caretaker') . 'res/css/tx.caretaker.overview.css');
            $pluginItems = array();
            foreach ($panels as $id => $xtype) {
                $pluginItems[] = '{ id: "' . $id . '", xtype: "' . $xtype . '" , back_path: back_path , node_id: node_id }';
            }
            $this->pageRenderer->addJsInlineCode('Caretaker_Overview', '
				Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
				Ext.namespace("tx","tx.caretaker");

				Ext.onReady( function() {

					var back_path   = "' . $this->doc->backPath . '";
					var back_url    = "' . urlencode(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')) . '";
					var path_typo3  = "' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'typo3/";
					var	add_url     = "' . $PATH_TYPO3 . 'alt_doc.php?edit[###NODE_TYPE###][' . $storagePid . ']=new";
					var node_id     = "' . $node->getCaretakerNodeId() . '";
					var node_type   = "' . strtolower($node->getType()) . '";
					var node_hidden = "' . $node->getHidden() . '";
					var node_uid    = "' . $node->getUid() . '";
					var node_title  = "' . htmlspecialchars($node->getTitle() ? $node->getTitle() : '[no title]') . '( ' . ($node->getTypeDescription() ? htmlspecialchars($node->getTypeDescription()) : $node->getType()) . ' )" ;
					var node_state  = "' . $node->getTestResult()->getState() . '" ;
					var node_state_info  = "' . $node->getTestResult()->getStateInfo() . '" ;

					tx.caretaker.view = new Ext.Viewport({
						layout: "fit",
						items: {
								xtype    : "panel",
								id       : "node",
								autoScroll: true,
								title    : node_title,
								iconCls  : "icon-caretaker-type-" + node_type,
								tbar     : {
									xtype: "caretaker-nodetoolbar",
									back_path: back_path,
									path_typo3: path_typo3,
									back_url: back_url,
									add_url :add_url,
									node_id: node_id,
									node_type: node_type,
									node_uid: node_uid,
									node_hidden: node_hidden,
									node_state: node_state,
									node_state_info: node_state_info
								},
								items    : [
									{
										xtype    : "panel",
										padding  : "10",
										layout   : "fit",
										id       : "caretaker-panels",
										items    : [
											' . implode(chr(10) . ',', $pluginItems) . chr(10) . '
										]
									}
//.........这里部分代码省略.........
开发者ID:TrueType,项目名称:caretaker,代码行数:101,代码来源:index.php

示例14: listTasks

    /**
     * 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 \TYPO3\CMS\Core\Messaging\FlashMessage */
            $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('msg.noTasks'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
            $content .= $flashMessage->render();
        } else {
            // Load ExtJS framework and specific JS library
            $this->pageRenderer->loadExtJS();
            $this->pageRenderer->addJsFile(ExtensionManagementUtility::extRelPath('scheduler') . 'res/tx_scheduler_be.js');
            // 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="#" onclick="toggleCheckboxes();" 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') . '/res/gfx/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');
                        }
//.........这里部分代码省略.........
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:101,代码来源:SchedulerModuleController.php

示例15: editTask


//.........这里部分代码省略.........
            $taskInfo['start'] = $GLOBALS['EXEC_TIME'];
            $taskInfo['end'] = '';
            $taskInfo['frequency'] = '';
            $taskInfo['multiple'] = 0;
            $process = 'add';
        }
        if (count($this->submittedData) > 0) {
            // If some data was already submitted, use it to override
            // existing data
            \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($taskInfo, $this->submittedData);
        }
        // Get the extra fields to display for each task that needs some
        $allAdditionalFields = array();
        if ($process === 'add') {
            foreach ($registeredClasses as $class => $registrationInfo) {
                if (!empty($registrationInfo['provider'])) {
                    /** @var $providerObject \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface */
                    $providerObject = GeneralUtility::getUserObj($registrationInfo['provider']);
                    if ($providerObject instanceof \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface) {
                        $additionalFields = $providerObject->getAdditionalFields($taskInfo, NULL, $this);
                        $allAdditionalFields = array_merge($allAdditionalFields, array($class => $additionalFields));
                    }
                }
            }
        } else {
            if (!empty($registeredClasses[$taskInfo['class']]['provider'])) {
                $providerObject = GeneralUtility::getUserObj($registeredClasses[$taskInfo['class']]['provider']);
                if ($providerObject instanceof \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface) {
                    $allAdditionalFields[$taskInfo['class']] = $providerObject->getAdditionalFields($taskInfo, $task, $this);
                }
            }
        }
        // Load necessary JavaScript
        $this->pageRenderer->loadExtJS();
        $this->pageRenderer->loadJquery();
        $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Scheduler/Scheduler');
        $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/tceforms.js');
        $this->pageRenderer->addJsFile($this->backPath . 'js/extjs/ux/Ext.ux.DateTimePicker.js');
        // Define settings for Date Picker
        $typo3Settings = array('datePickerUSmode' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['USdateFormat'] ? 1 : 0, 'dateFormat' => array('j-n-Y', 'G:i j-n-Y'), 'dateFormatUS' => array('n-j-Y', 'G:i n-j-Y'));
        $this->pageRenderer->addInlineSettingArray('', $typo3Settings);
        // Define table layout for add/edit form
        $tableLayout = array('table' => array('<table border="0" cellspacing="0" cellpadding="0" id="edit_form" class="typo3-usersettings">', '</table>'));
        // Define a style for hiding
        // Some fields will be hidden when the task is not recurring
        $style = '';
        if ($taskInfo['type'] == 1) {
            $style = ' style="display: none"';
        }
        // Start rendering the add/edit form
        $content .= '<input type="hidden" name="tx_scheduler[uid]" value="' . htmlspecialchars($this->submittedData['uid']) . '" />';
        $content .= '<input type="hidden" name="previousCMD" value="' . htmlspecialchars($this->CMD) . '" />';
        $table = array();
        $tr = 0;
        $defaultCell = array('<td class="td-input">', '</td>');
        // Disable checkbox
        $label = '<label for="task_disable">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xlf:disable') . '</label>';
        $table[$tr][] = BackendUtility::wrapInHelp($this->cshKey, 'task_disable', $label);
        $table[$tr][] = '<input type="hidden" name="tx_scheduler[disable]" value="0" />
			 <input type="checkbox" name="tx_scheduler[disable]" value="1" id="task_disable"' . ($taskInfo['disable'] == 1 ? ' checked="checked"' : '') . ' />';
        $tableLayout[$tr] = array('tr' => array('<tr id="task_disable_row">', '</tr>'), 'defCol' => $defaultCell, '0' => array('<td class="td-label">', '</td>'));
        $tr++;
        // Task class selector
        $label = '<label for="task_class">' . $GLOBALS['LANG']->getLL('label.class') . '</label>';
        $table[$tr][] = BackendUtility::wrapInHelp($this->cshKey, 'task_class', $label);
        // On editing, don't allow changing of the task class, unless it was not valid
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:67,代码来源:SchedulerModuleController.php


注:本文中的TYPO3\CMS\Core\Page\PageRenderer::loadExtJS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。