本文整理汇总了PHP中PageLayout::getTabNavigationPath方法的典型用法代码示例。如果您正苦于以下问题:PHP PageLayout::getTabNavigationPath方法的具体用法?PHP PageLayout::getTabNavigationPath怎么用?PHP PageLayout::getTabNavigationPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageLayout
的用法示例。
在下文中一共展示了PageLayout::getTabNavigationPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: NavigationWidget
<?php
# Lifter010: TODO
$navigation = PageLayout::getTabNavigation();
$tab_root_path = PageLayout::getTabNavigationPath();
if ($navigation) {
$subnavigation = $navigation->activeSubNavigation();
if ($subnavigation !== null) {
$nav_links = new NavigationWidget();
$nav_links->id = 'sidebar-navigation';
foreach ($subnavigation as $path => $nav) {
if (!$nav->isVisible()) {
continue;
}
$nav_id = "nav_" . implode("_", preg_split("/\\//", $tab_root_path, -1, PREG_SPLIT_NO_EMPTY)) . "_" . $path;
$link = $nav_links->addLink($nav->getTitle(), URLHelper::getLink($nav->getURL()), null, array('id' => $nav_id));
$link->setActive($nav->isActive());
if (!$nav->isEnabled()) {
$link['disabled'] = true;
$link->addClass('quiet');
}
}
if ($nav_links->hasElements()) {
Sidebar::get()->insertWidget($nav_links, ':first');
}
}
}
// TODO: Remove this after sidebar migration has been completed
if ($infobox && is_array($infobox)) {
$sidebar = Sidebar::get();
if (!$sidebar->getImage()) {