public static function tabbable($type, $tabs, $htmlOptions = array())
    {
        self::addCssClass('tabbable', $htmlOptions);
        $placement = TbArray::popValue('placement', $htmlOptions);
        if (!empty($placement)) {
            self::addCssClass('tabs-' . $placement, $htmlOptions);
        }
        $menuOptions = TbArray::popValue('menuOptions', $htmlOptions, array());
        $contentOptions = TbArray::popValue('contentOptions', $htmlOptions, array());
        self::addCssClass('tab-content', $contentOptions);
        $panes = array();
        $items = self::normalizeTabs($tabs, $panes);
        $menu = self::nav($type, $items, $menuOptions);
        $content = self::tag('div', $contentOptions, implode('', $panes));
        $output = self::openTag('div', $htmlOptions);
        $output .= $placement === self::TABS_PLACEMENT_BELOW ? $content . $menu : $menu . $content;
        $output .= '</div>';
        return $output;
    }
public static function tabbable($type, $tabs, $htmlOptions = array())
    {
        self::addCssClass('tabbable', $htmlOptions);
        $placement = TbArray::popValue('placement', $htmlOptions);
        if (!empty($placement)) {
            self::addCssClass('tabs-' . $placement, $htmlOptions);
        }
        $menuOptions = TbArray::popValue('menuOptions', $htmlOptions, array());
        $contentOptions = TbArray::popValue('contentOptions', $htmlOptions, array());
        self::addCssClass('tab-content', $contentOptions);
        $panes = array();
        $items = self::normalizeTabs($tabs, $panes);
        $menu = self::nav($type, $items, $menuOptions);
        $content = self::tag('div', $contentOptions, implode('', $panes));
        $output = self::openTag('div', $htmlOptions);
        $output .= $placement === self::TABS_PLACEMENT_BELOW ? $content . $menu : $menu . $content;
        $output .= '</div>';
        return $output;
    }
public static function tabbable ( $ type , $ tabs , $ htmlOptions = array ( ) ) { self :: addCssClass ( 'tabbable' , $ htmlOptions ) ; $ placement = TbArray :: popValue ( 'placement' , $ htmlOptions ) ; if ( ! empty ( $ placement ) ) { self :: addCssClass ( 'tabs-' . $ placement , $ htmlOptions ) ; } $ menuOptions = TbArray :: popValue ( 'menuOptions' , $ htmlOptions , array ( ) ) ; $ contentOptions = TbArray :: popValue ( 'contentOptions' , $ htmlOptions , array ( ) ) ; self :: addCssClass ( 'tab-content' , $ contentOptions ) ; $ panes = array ( ) ; $ items = self :: normalizeTabs ( $ tabs , $ panes ) ; $ menu = self :: nav ( $ type , $ items , $ menuOptions ) ; $ content = self :: tag ( 'div' , $ contentOptions , implode ( '' , $ panes ) ) ; $ output = self :: openTag ( 'div' , $ htmlOptions ) ; $ output .= $ placement === self :: TABS_PLACEMENT_BELOW ? $ content . $ menu : $ menu . $ content ; $ output .= '</div>' ; return $ output ; }
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.
Generates a tabbable menu .