PHP Класс yii\bootstrap\ToggleButtonGroup

You can use this widget in an [[yii\bootstrap\ActiveForm|ActiveForm]] using the [[yii\widgets\ActiveField::widget()|widget()]] method, for example like this: php field($model, 'item_id')->widget(\yii\bootstrap\ToggleButtonGroup::classname(), [ configure additional widget properties here ]) ?>
См. также: http://getbootstrap.com/javascript/#buttons-checkbox-radio
С версии: 2.0.6
Автор: Paul Klimov ([email protected])
Наследование: extends InputWidget
Показать файл Открыть проект

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

Свойство Тип Описание
$encodeLabels whether the items labels should be HTML-encoded.
$items the data item used to generate the checkboxes. The array values are the labels, while the array keys are the corresponding checkbox or radio values.
$labelOptions
$type input type, can be: - 'checkbox' - 'radio'

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

Метод Описание
init ( )
renderItem ( integer $index, string $label, string $name, boolean $checked, string $value ) : string Default callback for checkbox/radio list item rendering.
run ( )

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

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

public init ( )

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

Default callback for checkbox/radio list item rendering.
См. также: Html::checkbox()
См. также: Html::radio()
public renderItem ( integer $index, string $label, string $name, boolean $checked, string $value ) : string
$index integer item index.
$label string item label.
$name string input name.
$checked boolean whether value is checked or not.
$value string input value.
Результат string generated HTML.

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

public run ( )

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

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

whether the items labels should be HTML-encoded.
public $encodeLabels

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

the data item used to generate the checkboxes. The array values are the labels, while the array keys are the corresponding checkbox or radio values.
public $items

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

См. также: Html::checkbox()
См. также: Html::radio()
public $labelOptions

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

input type, can be: - 'checkbox' - 'radio'
public $type