yii\helpers\BaseHtml::activeCheckbox PHP Method

activeCheckbox() public static method

This method will generate the "checked" tag attribute according to the model attribute value.
public static activeCheckbox ( Model $model, string $attribute, array $options = [] ) : string
$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
    public static function activeCheckbox($model, $attribute, $options = [])
    {
        return static::activeBooleanInput('checkbox', $model, $attribute, $options);
    }