activeCheckbox() public static method
Generates a checkbox tag together with a label for the given model attribute.
This method will generate the "checked" tag attribute according to the model attribute value.
public static string activeCheckbox ( $model, $attribute, $options = [] ) | ||
---|---|---|
$model | yii\base\Model |
The model object |
$attribute | string |
The attribute name or expression. See getAttributeName() for the format about attribute expression. |
$options | array |
The tag options in terms of name-value pairs. See booleanInput() for details about accepted attributes. |
return | string |
The generated checkbox tag |
Please login to continue.