本文整理汇总了PHP中TYPO3\CMS\Core\Page\PageRenderer::enableDebugMode方法的典型用法代码示例。如果您正苦于以下问题:PHP PageRenderer::enableDebugMode方法的具体用法?PHP PageRenderer::enableDebugMode怎么用?PHP PageRenderer::enableDebugMode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Page\PageRenderer
的用法示例。
在下文中一共展示了PageRenderer::enableDebugMode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isJqueryLoadedFromSourceUncompressedIfDebugModeIsEnabled
/**
* Tests whether jQuery is correctly loaded, from the respective CDNs
*
* @dataProvider loadJqueryFromSourceDataProvider
* @test
*/
public function isJqueryLoadedFromSourceUncompressedIfDebugModeIsEnabled($version, $source, $regex)
{
$this->fixture->loadJquery($version, $source);
$this->fixture->enableDebugMode();
$out = $this->fixture->render();
$this->assertRegExp($regex, $out);
}
示例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;
}