本文整理汇总了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;
}