本文整理匯總了PHP中Fisharebest\Webtrees\Controller\PageController::getMetaRobots方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageController::getMetaRobots方法的具體用法?PHP PageController::getMetaRobots怎麽用?PHP PageController::getMetaRobots使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Fisharebest\Webtrees\Controller\PageController
的用法示例。
在下文中一共展示了PageController::getMetaRobots方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: headContents
/**
* Create the contents of the <head> tag.
*
* @param PageController $controller The current controller
*
* @return string
*/
protected function headContents(PageController $controller)
{
// The title often includes the names of records, which may include HTML markup.
$title = Filter::unescapeHtml($controller->getPageTitle());
// If an extra (site) title is specified, append it.
if ($this->tree && $this->tree->getPreference('META_TITLE')) {
$title .= ' – ' . $this->tree->getPreference('META_TITLE');
}
$html = '<!--[if IE 8]><script src="' . WT_MODERNIZR_JS_URL . '"></script><![endif]-->' . '<!--[if IE 8]><script src="' . WT_RESPOND_JS_URL . '"></script><![endif]-->' . $this->metaCharset() . $this->title($title) . $this->favicon() . $this->metaViewport() . $this->metaRobots($controller->getMetaRobots()) . $this->metaUaCompatible() . $this->metaGenerator(WT_WEBTREES . ' ' . WT_VERSION . ' - ' . WT_WEBTREES_URL);
if ($this->tree) {
$html .= $this->metaDescription($this->tree->getPreference('META_DESCRIPTION'));
}
// CSS files
foreach ($this->stylesheets() as $css) {
$html .= '<link rel="stylesheet" type="text/css" href="' . $css . '">';
}
return $html;
}