TbHtml::splitButtonDropdown PHP Method

splitButtonDropdown() public static method

Generates a button with a split dropdown menu.
public static splitButtonDropdown ( string $label, array $items, array $htmlOptions = [] ) : string
$label string the button label text.
$items array the menu items.
$htmlOptions array additional HTML attributes.
return string the generated button.
    public static function splitButtonDropdown($label, $items, $htmlOptions = array())
    {
        $htmlOptions['split'] = true;
        return self::buttonDropdown($label, $items, $htmlOptions);
    }

Usage Example

Exemplo n.º 1
0
 public function testSplitButtonDropdown()
 {
     $I = $this->codeGuy;
     $items = array(array('label' => 'Action', 'url' => '#'), array('label' => 'Another action', 'url' => '#'), array('label' => 'Something else here', 'url' => '#'), TbHtml::menuDivider(), array('label' => 'Separate link', 'url' => '#'));
     $html = TbHtml::splitButtonDropdown('Action', $items);
     $group = $I->createNode($html, 'div.btn-group');
     $I->seeNodeChildren($group, array('a.btn', 'button.dropdown-toggle', 'ul.dropdown-menu'));
     CHtml::$count = 0;
 }
All Usage Examples Of TbHtml::splitButtonDropdown
TbHtml