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