本文整理匯總了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()) {