本文整理匯總了PHP中TbHtml::nav方法的典型用法代碼示例。如果您正苦於以下問題:PHP TbHtml::nav方法的具體用法?PHP TbHtml::nav怎麽用?PHP TbHtml::nav使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TbHtml
的用法示例。
在下文中一共展示了TbHtml::nav方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: run
/**
* Runs the widget.
*/
public function run()
{
if (!empty($this->items)) {
//echo TbHtml::nav($this->type, $this->items, $this->htmlOptions);
echo TbHtml::nav($this->type, $this->items, $this->htmlOptions, $this->submenuHtmlOptions);
//add submenuHtmlOptions parameter
}
}
示例2: run
/**
* Runs the widget.
*/
public function run()
{
if (!empty($this->items)) {
echo TbHtml::nav($this->type, $this->items, $this->htmlOptions);
}
}
示例3: renderTabsNavigation
/**
* Renders tab navigation
*/
public function renderTabsNavigation()
{
$navOptions = TbHtml::popOption('menuOptions', $this->htmlOptions, array());
echo TbHtml::nav($this->type, $this->menuItems, $navOptions);
}
示例4: testNav
public function testNav()
{
$I = $this->codeGuy;
$html = TbHtml::nav(TbHtml::NAV_TYPE_NONE, array(array('label' => 'Link', 'url' => '#')), array('stacked' => true));
$nav = $I->createNode($html, 'ul.nav');
$I->seeNodeCssClass($nav, 'nav-stacked');
}
示例5: tabbable
/**
* Generates a tabbable menu.
* @param string $type the menu type.
* @param array $tabs the tab configurations.
* @param array $htmlOptions additional HTML attributes.
* @return string the generated menu.
*/
public static function tabbable($type, $tabs, $htmlOptions = array())
{
$htmlOptions = self::addClassName('tabbable', $htmlOptions);
$placement = self::popOption('placement', $htmlOptions);
if (!empty($placement)) {
$htmlOptions = self::addClassName('tabs-' . $placement, $htmlOptions);
}
$menuOptions = self::popOption('menuOptions', $htmlOptions, array());
$contentOptions = self::popOption('contentOptions', $htmlOptions, array());
$contentOptions = self::addClassName('tab-content', $contentOptions);
$panes = array();
$menu = TbHtml::nav($type, self::normalizeTabs($tabs, $panes), $menuOptions);
$content = TbHtml::tag('div', $contentOptions, implode('', $panes));
$output = TbHtml::openTag('div', $htmlOptions);
$output .= $placement === self::TABS_PLACEMENT_BELOW ? $content . $menu : $menu . $content;
$output .= '</div>';
return $output;
}