activeCheckboxList() public static method
Generates a list of checkboxes.
A checkbox list allows multiple selection, like listBox(). As a result, the corresponding submitted value is an array. The selection of the checkbox list is taken from the value of the model attribute.
public static string activeCheckboxList ( $model, $attribute, $items, $options = [] ) | ||
---|---|---|
$model | yii\base\Model |
The model object |
$attribute | string |
The attribute name or expression. See getAttributeName() for the format about attribute expression. |
$items | array |
The data item used to generate the checkboxes. The array keys are the checkbox values, and the array values are the corresponding labels. Note that the labels will NOT be HTML-encoded, while the values will. |
$options | array |
Options (name => config) for the checkbox list container tag. The following options are specially handled:
See renderTagAttributes() for details on how attributes are being rendered. |
return | string |
The generated checkbox list |
Please login to continue.