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
]) ?>
Показать файл
Открыть проект
Открытые свойства
Свойство |
Тип |
Описание |
|
$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' |
|
Открытые методы
Описание методов
renderItem()
публичный Метод
Default callback for checkbox/radio list item rendering.
Описание свойств
$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 публичное свойство
input type, can be:
- 'checkbox'
- 'radio'