PHP Класс yii\bootstrap\ButtonDropdown

For example, php a button group using Dropdown widget echo ButtonDropdown::widget([ 'label' => 'Action', 'dropdown' => [ 'items' => [ ['label' => 'DropdownA', 'url' => '/'], ['label' => 'DropdownB', 'url' => '#'], ], ], ]);
См. также: http://getbootstrap.com/javascript/#buttons
См. также: http://getbootstrap.com/components/#btn-dropdowns
С версии: 2.0
Автор: Antonio Ramirez ([email protected])
Наследование: extends yii\bootstrap\Widget
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$containerOptions the HTML attributes for the container tag. The following special options are recognized: - tag: string, defaults to "div", the name of the container tag.
$dropdown the configuration array for Dropdown.
$dropdownClass name of a class to use for rendering dropdowns withing this widget. Defaults to Dropdown.
$encodeLabel whether the label should be HTML-encoded.
$label the button label
$options the HTML attributes of the button.
$split whether to display a group of split-styled button group.
$tagName the tag to use to render the button

Открытые методы

Метод Описание
run ( ) Renders the widget.

Защищенные методы

Метод Описание
renderButton ( ) : string Generates the button dropdown.
renderDropdown ( ) : string Generates the dropdown menu.

Описание методов

renderButton() защищенный Метод

Generates the button dropdown.
protected renderButton ( ) : string
Результат string the rendering result.

renderDropdown() защищенный Метод

Generates the dropdown menu.
protected renderDropdown ( ) : string
Результат string the rendering result.

run() публичный Метод

Renders the widget.
public run ( )

Описание свойств

$containerOptions публичное свойство

the HTML attributes for the container tag. The following special options are recognized: - tag: string, defaults to "div", the name of the container tag.
См. также: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
С версии: 2.0.1
public $containerOptions

$dropdown публичное свойство

the configuration array for Dropdown.
public $dropdown

$dropdownClass публичное свойство

name of a class to use for rendering dropdowns withing this widget. Defaults to Dropdown.
С версии: 2.0.7
public $dropdownClass

$encodeLabel публичное свойство

whether the label should be HTML-encoded.
public $encodeLabel

$label публичное свойство

the button label
public $label

$options публичное свойство

the HTML attributes of the button.
См. также: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$split публичное свойство

whether to display a group of split-styled button group.
public $split

$tagName публичное свойство

the tag to use to render the button
public $tagName