本文整理汇总了PHP中TYPO3\CMS\Core\Page\PageRenderer::enableCompressCss方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::enableCompressCss方法的具体用法?PHP PageRenderer::enableCompressCss怎么用?PHP PageRenderer::enableCompressCss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Page\PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::enableCompressCss方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: 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();
}
}
示例3: 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;
}
示例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 = \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;
}