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


PHP PageRenderer::enableCompressJavascript方法代码示例

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


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

示例1: __construct

 /**
  * Constructs this view
  *
  * Defines the global variable SOBE. Normally this is used by the wizards
  * which are one file only. This view is now the class with the global
  * variable name SOBE.
  *
  * Defines the document template object.
  *
  * @param \TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository
  * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
  */
 public function __construct(\TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository)
 {
     parent::__construct($repository);
     $GLOBALS['SOBE'] = $this;
     // Define the document template object
     $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('EXT:form/Resources/Private/Templates/Wizard.html');
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->pageRenderer->enableConcatenateFiles();
     $this->pageRenderer->enableCompressCss();
     $this->pageRenderer->enableCompressJavascript();
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:25,代码来源:WizardView.php

示例2: isScriptaculousNotLoadedCompressedIfCompressionIsNotConfigured

 /**
  * Tests whether scriptaculous is correctly loaded, but without compression
  * if no compression is configured.
  *
  * @test
  */
 public function isScriptaculousNotLoadedCompressedIfCompressionIsNotConfigured()
 {
     $_SERVER['HTTP_ACCEPT_ENCODING'] = 'gzip,deflate';
     $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = '';
     $this->fixture->loadScriptaculous('slider,controls');
     $this->fixture->enableCompressJavascript();
     $out = $this->fixture->render();
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/scriptaculous-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/effects-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/controls-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
     $this->assertRegExp('#<script src="[^"]*/typo3temp/compressor/slider-[a-f0-9]+.js" type="text/javascript"></script>#', $out);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:18,代码来源:PageRendererTest.php

示例3: initPageRenderer

 /**
  * Initializes the page renderer object
  */
 protected function initPageRenderer()
 {
     if ($this->pageRenderer !== null) {
         return;
     }
     $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
     $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);
     $this->pageRenderer->enableConcatenateFiles();
     $this->pageRenderer->enableCompressCss();
     $this->pageRenderer->enableCompressJavascript();
     // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
     foreach ($this->jsFilesNoConcatenation as $file) {
         $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file, 'text/javascript', true, false, '', true);
     }
     // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
     foreach ($this->jsFiles as $file) {
         $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
     }
     if ((int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1) {
         $this->pageRenderer->enableDebugMode();
     }
 }
开发者ID:burguin,项目名称:test01,代码行数:25,代码来源:DocumentTemplate.php

示例4: getPageRenderer

 /**
  * Gets instance of PageRenderer configured with the current language, file references and debug settings
  *
  * @return \TYPO3\CMS\Core\Page\PageRenderer
  */
 public function getPageRenderer()
 {
     if (!isset($this->pageRenderer)) {
         $this->pageRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
         $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);
         $this->pageRenderer->addCssLibrary($GLOBALS['BACK_PATH'] . 'contrib/normalize/normalize.css', 'stylesheet', 'all', '', TRUE, TRUE);
         $this->pageRenderer->enableConcatenateFiles();
         $this->pageRenderer->enableCompressCss();
         $this->pageRenderer->enableCompressJavascript();
         // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
         foreach ($this->jsFilesNoConcatenation as $file) {
             $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file, 'text/javascript', TRUE, FALSE, '', TRUE);
         }
         // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
         foreach ($this->jsFiles as $file) {
             $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
         }
     }
     if ((int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1) {
         $this->pageRenderer->enableDebugMode();
     }
     return $this->pageRenderer;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:28,代码来源:DocumentTemplate.php

示例5: getPageRenderer

 /**
  * Gets instance of PageRenderer configured with the current language, file references and debug settings
  *
  * @return \TYPO3\CMS\Core\Page\PageRenderer
  */
 public function getPageRenderer()
 {
     if (!isset($this->pageRenderer)) {
         $this->pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
         $this->pageRenderer->setTemplateFile(TYPO3_mainDir . 'templates/template_page_backend.html');
         $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);
         $this->pageRenderer->enableConcatenateFiles();
         $this->pageRenderer->enableCompressCss();
         $this->pageRenderer->enableCompressJavascript();
         // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
         foreach ($this->jsFiles as $file) {
             $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
         }
     }
     if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1) {
         $this->pageRenderer->enableDebugMode();
     }
     return $this->pageRenderer;
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:24,代码来源:DocumentTemplate.php


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