pills() public static method

Generates a pills navigation.
public static pills ( array $items, array $htmlOptions = [] ) : string
$items array the menu items.
$htmlOptions array additional HTML attributes.
return string the generated menu.
Exemplo n.º 1
0
 public function testPills()
 {
     $I = $this->codeGuy;
     $html = TbHtml::pills(array(array('label' => 'Link', 'url' => '#')));
     $nav = $I->createNode($html, 'ul.nav');
     $I->seeNodeCssClass($nav, 'nav-pills');
 }
<?php

echo TbHtml::pills(MenuItem::model()->findByPk($id)->getItems());
Exemplo n.º 3
0
    array('label' => 'Help', 'url' => '#'),
    array('label' => 'Dropdown', 'items' => array(
        array('label' => 'Action', 'url' => '#'),
        array('label' => 'Another action', 'url' => '#'),
        array('label' => 'Something else here', 'url' => '#'),
        TbHtml::menuDivider(),
        array('label' => 'Separate link', 'url' => '#'),
    )),
)); ?>
</pre>

   <h3>Pills with dropdowns</h3>

    <div class="bs-docs-example">
        <?php 
echo TbHtml::pills(array(array('label' => 'Home', 'url' => '#', 'active' => true), array('label' => 'Help', 'url' => '#'), array('label' => 'Dropdown', 'items' => $dropdownConfig)));
?>
    </div>

    <pre class="prettyprint linenums">
&lt;?php echo TbHtml::tabs(array(
    array('label' => 'Home', 'url' => '#', 'active' => true),
    array('label' => 'Help', 'url' => '#'),
    array('label' => 'Dropdown', 'items' => array(
        array('label' => 'Action', 'url' => '#'),
        array('label' => 'Another action', 'url' => '#'),
        array('label' => 'Something else here', 'url' => '#'),
        TbHtml::menuDivider(),
        array('label' => 'Separate link', 'url' => '#'),
    )),
)); ?>