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


PHP PageRenderer::addCssFile方法代码示例

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


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

示例1: render

 /**
  * Render
  *
  * @param string $file
  */
 public function render($file = NULL)
 {
     if ($this->isCached()) {
         $this->pageRenderer->addCssFile($file, $this->arguments['rel'], $this->arguments['media'], $this->arguments['title'], $this->arguments['compress'], $this->arguments['forceOnTop'], $this->arguments['allWrap'], $this->arguments['excludeFromConcatenation']);
     } else {
         $GLOBALS['TSFE']->additionalHeaderData[md5($file)] = '<link rel="' . $this->arguments['rel'] . '" type="text/css" media="' . $this->arguments['media'] . '" href="' . $file . '" />';
     }
 }
开发者ID:moodley,项目名称:site_base,代码行数:13,代码来源:IncludeCssViewHelper.php

示例2: 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

示例3: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:scheduler_timeline/Resources/Private/Language/locallang.xml');
     $this->pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler_timeline') . 'Resources/Public/StyleSheet/timeline.css');
     $this->pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler_timeline') . 'Resources/Public/StyleSheet/bars.css');
     $this->pageRenderer->addJsLibrary('jquery', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler_timeline') . 'Resources/Public/JavaScript/jquery-1.6.2.min.js');
     $this->pageRenderer->addJsLibrary('jquery_tooltip', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler_timeline') . 'Resources/Public/JavaScript/tooltip.js');
     $this->pageRenderer->addJsLibrary('jquery_tooltip_dynamic', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler_timeline') . 'Resources/Public/JavaScript/tooltip.dynamic.js');
     $this->addJsFileToPageRenderer(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('scheduler_timeline') . 'Resources/Public/JavaScript/common.js');
 }
开发者ID:AOEpeople,项目名称:scheduler_timeline,代码行数:15,代码来源:TimelineController.php

示例4: initializeAction

 /**
  * Initializes the rendering action.
  *
  * Use this method to add all static assets.
  */
 public function initializeAction()
 {
     if (!$this->cache->has('brushes')) {
         return;
     }
     $themeCss = $this->resolveFilePathReference(sprintf(self::CSS_PATH . '/shCore%s.css', $this->settings['code_snippet']['theme']));
     $this->pageRenderer->addCssFile($themeCss);
     $coreJs = $this->resolveFilePathReference(self::JS_PATH . '/shCore.min.js');
     $this->pageRenderer->addJsFooterLibrary('codesnippet_core', $coreJs);
     $autoloaderJs = $this->resolveFilePathReference(self::JS_PATH . '/shAutoloader.min.js');
     $this->pageRenderer->addJsFooterLibrary('codesnippet_autoloader', $autoloaderJs);
 }
开发者ID:svenhartmann,项目名称:vantomas,代码行数:17,代码来源:SyntaxHighlighterController.php

示例5: render

 /**
  * Load the assets (JavaScript, CSS) for this Vidi module.
  *
  * @return void
  * @api
  */
 public function render()
 {
     /** @var \Fab\Vidi\Module\ModuleLoader $moduleLoader */
     $moduleLoader = $this->objectManager->get('Fab\\Vidi\\Module\\ModuleLoader');
     foreach ($moduleLoader->getAdditionalStyleSheetFiles() as $addCssFile) {
         $fileNameAndPath = $this->resolvePath($addCssFile);
         $this->pageRenderer->addCssFile($fileNameAndPath);
     }
     foreach ($moduleLoader->getAdditionalJavaScriptFiles() as $addJsFile) {
         $fileNameAndPath = $this->resolvePath($addJsFile);
         $this->pageRenderer->addJsFile($fileNameAndPath);
     }
 }
开发者ID:BergischMedia,项目名称:vidi,代码行数:19,代码来源:AdditionalAssetsViewHelper.php

示例6: __construct

    /**
     * @constuctor
     *
     * @param	string	$absolutename absolutename
     * @param	string	$name name
     * @param	array	$configuration configuration
     * @param	\Ameos\AmeosForm\Form $form form
     */
    public function __construct($absolutename, $name, $configuration = [], $form)
    {
        parent::__construct($absolutename, $name, $configuration, $form);
        $this->pageRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
        if (!isset($this->configuration['format'])) {
            $this->configuration['format'] = 'D MMM YYYY';
        }
        $this->pageRenderer->addCssFile('/typo3conf/ext/ameos_form/Resources/Public/Pikaday/css/pikaday.css');
        $this->pageRenderer->addJsFooterFile('/typo3conf/ext/ameos_form/Resources/Public/Momentjs/moment.js');
        $this->pageRenderer->addJsFooterFile('/typo3conf/ext/ameos_form/Resources/Public/Pikaday/pikaday.js');
        $this->pageRenderer->addJsFooterFile('/typo3conf/ext/ameos_form/Resources/Public/Elements/datepicker.js');
        $this->pageRenderer->addJsFooterInlineCode('init-datepicker-' . $name, '
			var i18n = {
				previousMonth: "' . LocalizationUtility::translate('previousMonth', 'AmeosForm') . '",
				nextMonth: "' . LocalizationUtility::translate('nextMonth', 'AmeosForm') . '",
				months : {
					1: "' . LocalizationUtility::translate('months.1', 'AmeosForm') . '",
					2: "' . LocalizationUtility::translate('months.2', 'AmeosForm') . '",
					3: "' . LocalizationUtility::translate('months.3', 'AmeosForm') . '",
					4: "' . LocalizationUtility::translate('months.4', 'AmeosForm') . '",
					5: "' . LocalizationUtility::translate('months.5', 'AmeosForm') . '",
					6: "' . LocalizationUtility::translate('months.6', 'AmeosForm') . '",
					7: "' . LocalizationUtility::translate('months.7', 'AmeosForm') . '",
					8: "' . LocalizationUtility::translate('months.8', 'AmeosForm') . '",
					9: "' . LocalizationUtility::translate('months.9', 'AmeosForm') . '",
					10: "' . LocalizationUtility::translate('months.10', 'AmeosForm') . '",
					11: "' . LocalizationUtility::translate('months.11', 'AmeosForm') . '",
					12: "' . LocalizationUtility::translate('months.12', 'AmeosForm') . '"
				},
				weekdays : {
					1: "' . LocalizationUtility::translate('weekdays.1', 'AmeosForm') . '",
					2: "' . LocalizationUtility::translate('weekdays.2', 'AmeosForm') . '",
					3: "' . LocalizationUtility::translate('weekdays.3', 'AmeosForm') . '",
					4: "' . LocalizationUtility::translate('weekdays.4', 'AmeosForm') . '",
					5: "' . LocalizationUtility::translate('weekdays.5', 'AmeosForm') . '",
					6: "' . LocalizationUtility::translate('weekdays.6', 'AmeosForm') . '",
					7: "' . LocalizationUtility::translate('weekdays.7', 'AmeosForm') . '"
				},
				weekdaysShort : {
					1: "' . LocalizationUtility::translate('weekdaysShort.1', 'AmeosForm') . '",
					2: "' . LocalizationUtility::translate('weekdaysShort.2', 'AmeosForm') . '",
					3: "' . LocalizationUtility::translate('weekdaysShort.3', 'AmeosForm') . '",
					4: "' . LocalizationUtility::translate('weekdaysShort.4', 'AmeosForm') . '",
					5: "' . LocalizationUtility::translate('weekdaysShort.5', 'AmeosForm') . '",
					6: "' . LocalizationUtility::translate('weekdaysShort.6', 'AmeosForm') . '",
					7: "' . LocalizationUtility::translate('weekdaysShort.7', 'AmeosForm') . '"
				}
			};
			initDatepicker("' . $this->getHtmlId() . '", "' . $this->configuration['format'] . '", i18n);
		');
    }
开发者ID:ameos,项目名称:ameos_form,代码行数:59,代码来源:Datepicker.php

示例7: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     // @todo Evaluate how the intval() call can be used with Extbase validators/filters
     $this->pageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
     $icons = array('language' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('flags-multiple'), 'integrity' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-information'), 'success' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-ok'), 'info' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-information'), 'warning' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-warning'), 'error' => \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses('status-dialog-error'));
     $this->pageRenderer->addInlineSetting('Workspaces', 'icons', $icons);
     $this->pageRenderer->addInlineSetting('Workspaces', 'id', $this->pageId);
     $this->pageRenderer->addInlineSetting('Workspaces', 'depth', $this->pageId === 0 ? 999 : 1);
     $this->pageRenderer->addInlineSetting('Workspaces', 'language', $this->getLanguageSelection());
     $this->pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/StyleSheet/module.css');
     $this->pageRenderer->addInlineLanguageLabelArray(array('title' => $GLOBALS['LANG']->getLL('title'), 'path' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.path'), 'table' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.table'), 'depth' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_perm.xlf:Depth'), 'depth_0' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'), 'depth_1' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'), 'depth_2' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'), 'depth_3' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'), 'depth_4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_4'), 'depth_infi' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')));
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:workspaces/Resources/Private/Language/locallang.xlf');
     $this->assignExtensionSettings();
 }
开发者ID:Mr-Robota,项目名称:TYPO3.CMS,代码行数:19,代码来源:AbstractController.php

示例8: init

 /**
  * Initializes the backend module
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // Initialize document
     $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(ExtensionManagementUtility::extPath('scheduler') . 'mod1/mod_template.html');
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->pageRenderer->addCssFile(ExtensionManagementUtility::extRelPath('scheduler') . 'res/tx_scheduler_be.css');
     $this->doc->backPath = $this->backPath;
     $this->doc->bodyTagId = 'typo3-mod-php';
     $this->doc->bodyTagAdditions = 'class="tx_scheduler_mod1"';
     // Create scheduler instance
     $this->scheduler = GeneralUtility::makeInstance('TYPO3\\CMS\\Scheduler\\Scheduler');
 }
开发者ID:samuweiss,项目名称:TYPO3-Site,代码行数:19,代码来源:SchedulerModuleController.php

示例9: testAddCssFile

 /**
  * test add CSS file
  */
 public function testAddCssFile()
 {
     $expectedReturnValue = '<link rel="stylesheet" type="text/css" href="fileadmin/test.css" media="all" />';
     $this->fixture->addCssFile('fileadmin/test.css');
     $out = $this->fixture->render();
     $this->assertContains($expectedReturnValue, $out);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:10,代码来源:PageRendererTest.php

示例10: addJSCSS

 /**
  * wrapper function called by hook (\TYPO3\CMS\Core\Page\PageRenderer->render-preProcess)
  *
  * @param array $parameters : An array of available parameters
  * @param \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer : The parent object that triggered this hook
  *
  * @return void
  */
 public function addJSCSS($parameters, &$pageRenderer)
 {
     // Add javascript
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Themes/ThemesBackendTca');
     // Add css
     $filename = $pageRenderer->backPath . ExtensionManagementUtility::extRelPath('themes') . 'Resources/Public/Stylesheet/ThemesBackendTca.css';
     $pageRenderer->addCssFile($filename, 'stylesheet', 'screen');
 }
开发者ID:dkd,项目名称:themes,代码行数:16,代码来源:PageRenderer.php

示例11: loadStylesheets

 /**
  * Loads all necessary stylesheets
  *
  * @return void
  */
 protected function loadStylesheets()
 {
     if ($GLOBALS['TBE_STYLES']['stylesheet']) {
         $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet']);
     }
     if ($GLOBALS['TBE_STYLES']['stylesheet2']) {
         $this->pageRenderer->addCssFile($GLOBALS['TBE_STYLES']['stylesheet2']);
     }
 }
开发者ID:Gregpl,项目名称:TYPO3.CMS,代码行数:14,代码来源:ModuleTemplate.php

示例12: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->pageRenderer = $this->getPageRenderer();
     // @todo Evaluate how the intval() call can be used with Extbase validators/filters
     $this->pageId = (int) GeneralUtility::_GP('id');
     $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $icons = array('language' => $iconFactory->getIcon('flags-multiple', Icon::SIZE_SMALL)->render(), 'integrity' => $iconFactory->getIcon('status-dialog-information', Icon::SIZE_SMALL)->render(), 'success' => $iconFactory->getIcon('status-dialog-ok', Icon::SIZE_SMALL)->render(), 'info' => $iconFactory->getIcon('status-dialog-information', Icon::SIZE_SMALL)->render(), 'warning' => $iconFactory->getIcon('status-dialog-warning', Icon::SIZE_SMALL)->render(), 'error' => $iconFactory->getIcon('status-dialog-error', Icon::SIZE_SMALL)->render());
     $this->pageRenderer->addInlineSetting('Workspaces', 'icons', $icons);
     $this->pageRenderer->addInlineSetting('Workspaces', 'id', $this->pageId);
     $this->pageRenderer->addInlineSetting('Workspaces', 'depth', $this->pageId === 0 ? 999 : 1);
     $this->pageRenderer->addInlineSetting('Workspaces', 'language', $this->getLanguageSelection());
     $cssFile = 'EXT:workspaces/Resources/Public/Css/module.css';
     $cssFile = GeneralUtility::getFileAbsFileName($cssFile);
     $this->pageRenderer->addCssFile(PathUtility::getAbsoluteWebPath($cssFile));
     $this->pageRenderer->addInlineLanguageLabelArray(array('title' => $GLOBALS['LANG']->getLL('title'), 'path' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.path'), 'table' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.table'), 'depth' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_perm.xlf:Depth'), 'depth_0' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'), 'depth_1' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'), 'depth_2' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'), 'depth_3' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'), 'depth_4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_4'), 'depth_infi' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')));
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:workspaces/Resources/Private/Language/locallang.xlf');
     $this->assignExtensionSettings();
 }
开发者ID:TYPO3Incubator,项目名称:TYPO3.CMS,代码行数:23,代码来源:AbstractController.php

示例13: includeCssFromPath

 /**
  * @param $path
  */
 protected function includeCssFromPath($path)
 {
     $resourcePath = ExtensionManagementUtility::extRelPath('typo3_forum') . $path;
     $absResourcePath = ExtensionManagementUtility::extPath('typo3_forum') . $path;
     $cssFiles = glob($absResourcePath . '*.css');
     foreach ($cssFiles as $cssFile) {
         $cssFile = str_replace($absResourcePath, $resourcePath, $cssFile);
         $this->pageRenderer->addCssFile($cssFile);
     }
 }
开发者ID:steffmeister,项目名称:typo3-forum,代码行数:13,代码来源:AbstractBackendController.php

示例14: loadCss

 /**
  * Load the necessarry css
  *
  * This will only be done when the referenced record is available
  *
  * @return void
  */
 protected function loadCss()
 {
     // TODO Set to TRUE when finished
     $compress = FALSE;
     $cssFiles = array('Wizard/Form.css', 'Wizard/Wizard.css');
     $baseUrl = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('form') . 'Resources/Public/CSS/';
     // Load the wizards css
     foreach ($cssFiles as $cssFile) {
         $this->pageRenderer->addCssFile($baseUrl . $cssFile, 'stylesheet', 'all', '', $compress, FALSE);
     }
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:18,代码来源:WizardView.php

示例15: 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


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