本文整理汇总了PHP中TYPO3\CMS\Core\TypoScript\TemplateService::printTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP TemplateService::printTitle方法的具体用法?PHP TemplateService::printTitle怎么用?PHP TemplateService::printTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\TypoScript\TemplateService
的用法示例。
在下文中一共展示了TemplateService::printTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tempPageCacheContent
/**
* Temp cache content
* The temporary cache will expire after a few seconds (typ. 30) or will be cleared by the rendered page, which will also clear and rewrite the cache.
*
* @return void
* @todo Define visibility
*/
public function tempPageCacheContent()
{
$this->tempContent = FALSE;
if (!$this->no_cache) {
$seconds = 30;
$title = htmlspecialchars($this->tmpl->printTitle($this->page['title']));
$request_uri = htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI'));
$stdMsg = '
<strong>Page is being generated.</strong><br />
If this message does not disappear within ' . $seconds . ' seconds, please reload.';
$message = $this->config['config']['message_page_is_being_generated'];
if (strcmp('', $message)) {
// This page is always encoded as UTF-8
$message = $this->csConvObj->utf8_encode($message, $this->renderCharset);
$message = str_replace('###TITLE###', $title, $message);
$message = str_replace('###REQUEST_URI###', $request_uri, $message);
} else {
$message = $stdMsg;
}
$temp_content = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>' . $title . '</title>
<meta http-equiv="refresh" content="10" />
</head>
<body style="background-color:white; font-family:Verdana,Arial,Helvetica,sans-serif; color:#cccccc; text-align:center;">' . $message . '
</body>
</html>';
// Fix 'nice errors' feature in modern browsers
$padSuffix = '<!--pad-->';
// prevent any trims
$padSize = 768 - strlen($padSuffix) - strlen($temp_content);
if ($padSize > 0) {
$temp_content = str_pad($temp_content, $padSize, LF) . $padSuffix;
}
if (!$this->headerNoCache() && ($cachedRow = $this->getFromCache_queryRow())) {
// We are here because between checking for cached content earlier and now some other HTTP-process managed to store something in cache AND it was not due to a shift-reload by-pass.
// This is either the "Page is being generated" screen or it can be the final result.
// In any case we should not begin another rendering process also, so we silently disable caching and render the page ourselves and thats it.
// Actually $cachedRow contains content that we could show instead of rendering. Maybe we should do that to gain more performance but then we should set all the stuff done in $this->getFromCache()... For now we stick to this...
$this->set_no_cache();
} else {
$this->tempContent = TRUE;
// This flag shows that temporary content is put in the cache
$this->setPageCacheContent($temp_content, $this->config, $GLOBALS['EXEC_TIME'] + $seconds);
}
}
}