本文整理匯總了PHP中PageLayout::getHelpKeyword方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageLayout::getHelpKeyword方法的具體用法?PHP PageLayout::getHelpKeyword怎麽用?PHP PageLayout::getHelpKeyword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PageLayout
的用法示例。
在下文中一共展示了PageLayout::getHelpKeyword方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: render
/**
* Renders the help bar.
* The helpbar will only be rendered if it actually contains any widgets.
* It will use the template "helpbar.php" located at "templates/helpbar".
* A notification is dispatched before and after the actual rendering
* process.
*
* @return String The HTML code of the rendered helpbar.
*/
public function render()
{
$this->loadContent();
// add tour links
if (Config::get()->TOURS_ENABLE) {
$widget = new HelpbarTourWidget();
if ($widget->hasElements()) {
$this->addWidget($widget);
}
$tour_data = $widget->tour_data;
}
// add wiki link and remove it from navigation
$this->addLink(_('Weiterführende Hilfe'), format_help_url(PageLayout::getHelpKeyword()), Icon::create('link-extern', 'info_alt'), '_blank');
$content = '';
NotificationCenter::postNotification('HelpbarWillRender', $this);
if ($this->should_render && $this->hasWidgets()) {
$template = $GLOBALS['template_factory']->open('helpbar/helpbar');
$template->widgets = $this->widgets;
$template->open = $this->open;
$template->tour_data = $tour_data;
$content = $template->render();
}
NotificationCenter::postNotification('HelpbarDidRender', $this);
return $content;
}