|
|
|
@ -750,12 +750,12 @@ class BaseHtml
|
|
|
|
|
* - options: array, the attributes for the select option tags. The array keys must be valid option values, |
|
|
|
|
* and the array values are the extra attributes for the corresponding option tags. For example, |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* [ |
|
|
|
|
* 'value1' => ['disabled' => true], |
|
|
|
|
* 'value2' => ['label' => 'value 2'], |
|
|
|
|
* ]; |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* - groups: array, the attributes for the optgroup tags. The structure of this is similar to that of 'options', |
|
|
|
|
* except that the array keys represent the optgroup labels specified in $items. |
|
|
|
@ -799,12 +799,12 @@ class BaseHtml
|
|
|
|
|
* - options: array, the attributes for the select option tags. The array keys must be valid option values, |
|
|
|
|
* and the array values are the extra attributes for the corresponding option tags. For example, |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* [ |
|
|
|
|
* 'value1' => ['disabled' => true], |
|
|
|
|
* 'value2' => ['label' => 'value 2'], |
|
|
|
|
* ]; |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* - groups: array, the attributes for the optgroup tags. The structure of this is similar to that of 'options', |
|
|
|
|
* except that the array keys represent the optgroup labels specified in $items. |
|
|
|
@ -866,9 +866,9 @@ class BaseHtml
|
|
|
|
|
* - item: callable, a callback that can be used to customize the generation of the HTML code |
|
|
|
|
* corresponding to a single item in $items. The signature of this callback must be: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* function ($index, $label, $name, $checked, $value) |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* where $index is the zero-based index of the checkbox in the whole list; $label |
|
|
|
|
* is the label for the checkbox; and $name, $value and $checked represent the name, |
|
|
|
@ -939,9 +939,9 @@ class BaseHtml
|
|
|
|
|
* - item: callable, a callback that can be used to customize the generation of the HTML code |
|
|
|
|
* corresponding to a single item in $items. The signature of this callback must be: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* function ($index, $label, $name, $checked, $value) |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* where $index is the zero-based index of the radio button in the whole list; $label |
|
|
|
|
* is the label for the radio button; and $name, $value and $checked represent the name, |
|
|
|
@ -999,9 +999,9 @@ class BaseHtml
|
|
|
|
|
* - item: callable, a callback that is used to generate each individual list item. |
|
|
|
|
* The signature of this callback must be: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* function ($item, $index) |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* where $index is the array key corresponding to `$item` in `$items`. The callback should return |
|
|
|
|
* the whole list item tag. |
|
|
|
@ -1045,9 +1045,9 @@ class BaseHtml
|
|
|
|
|
* - item: callable, a callback that is used to generate each individual list item. |
|
|
|
|
* The signature of this callback must be: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* function ($item, $index) |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* where $index is the array key corresponding to `$item` in `$items`. The callback should return |
|
|
|
|
* the whole list item tag. |
|
|
|
@ -1477,12 +1477,12 @@ class BaseHtml
|
|
|
|
|
* - options: array, the attributes for the select option tags. The array keys must be valid option values, |
|
|
|
|
* and the array values are the extra attributes for the corresponding option tags. For example, |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* [ |
|
|
|
|
* 'value1' => ['disabled' => true], |
|
|
|
|
* 'value2' => ['label' => 'value 2'], |
|
|
|
|
* ]; |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* - groups: array, the attributes for the optgroup tags. The structure of this is similar to that of 'options', |
|
|
|
|
* except that the array keys represent the optgroup labels specified in $items. |
|
|
|
@ -1526,12 +1526,12 @@ class BaseHtml
|
|
|
|
|
* - options: array, the attributes for the select option tags. The array keys must be valid option values, |
|
|
|
|
* and the array values are the extra attributes for the corresponding option tags. For example, |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* [ |
|
|
|
|
* 'value1' => ['disabled' => true], |
|
|
|
|
* 'value2' => ['label' => 'value 2'], |
|
|
|
|
* ]; |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* - groups: array, the attributes for the optgroup tags. The structure of this is similar to that of 'options', |
|
|
|
|
* except that the array keys represent the optgroup labels specified in $items. |
|
|
|
@ -1579,9 +1579,9 @@ class BaseHtml
|
|
|
|
|
* - item: callable, a callback that can be used to customize the generation of the HTML code |
|
|
|
|
* corresponding to a single item in $items. The signature of this callback must be: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* function ($index, $label, $name, $checked, $value) |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* where $index is the zero-based index of the checkbox in the whole list; $label |
|
|
|
|
* is the label for the checkbox; and $name, $value and $checked represent the name, |
|
|
|
@ -1620,9 +1620,9 @@ class BaseHtml
|
|
|
|
|
* - item: callable, a callback that can be used to customize the generation of the HTML code |
|
|
|
|
* corresponding to a single item in $items. The signature of this callback must be: |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* ```php |
|
|
|
|
* function ($index, $label, $name, $checked, $value) |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* where $index is the zero-based index of the radio button in the whole list; $label |
|
|
|
|
* is the label for the radio button; and $name, $value and $checked represent the name, |
|
|
|
@ -1803,11 +1803,11 @@ class BaseHtml
|
|
|
|
|
* If class specification at given options is an array, and some class placed there with the named (string) key, |
|
|
|
|
* overriding of such key will have no effect. For example: |
|
|
|
|
* |
|
|
|
|
* ~~~php |
|
|
|
|
* ```php |
|
|
|
|
* $options = ['class' => ['persistent' => 'initial']]; |
|
|
|
|
* Html::addCssClass($options, ['persistent' => 'override']); |
|
|
|
|
* var_dump($options['class']); // outputs: array('persistent' => 'initial'); |
|
|
|
|
* ~~~ |
|
|
|
|
* ``` |
|
|
|
|
* |
|
|
|
|
* @param array $options the options to be modified. |
|
|
|
|
* @param string|array $class the CSS class(es) to be added |
|
|
|
|