public function checkbox($fieldName, array $options = [])
    {
        $options = optionsParser($options);

        if (!$options->exists('hiddenField') || !$options->contains('hiddenField', false)) {
            $options->add('hiddenField', true);
        }

        return parent::checkbox($fieldName, $options->toArray());
    }
public function checkbox($fieldName, array $options = [])
    {
        $options = optionsParser($options);

        if (!$options->exists('hiddenField') || !$options->contains('hiddenField', false)) {
            $options->add('hiddenField', true);
        }

        return parent::checkbox($fieldName, $options->toArray());
    }
public function checkbox ( $ fieldName , array $ options = [ ] ) { $ options = optionsParser ( $ options ) ; if ( ! $ options -> exists ( 'hiddenField' ) || ! $ options -> contains ( 'hiddenField' , false ) ) { $ options -> add ( 'hiddenField' , true ) ; } return parent :: checkbox ( $ fieldName , $ options -> toArray ( ) ) ; }
Creates a checkbox element
@param string $fieldName Field name, should be "Modelname.fieldname"
@param array $options HTML attributes and options
@return string
Creates a checkbox element