protected function _normalizeFormFields($fields)
    {
        $_options = [
            'on' => 'both'
        ];

        $_defaults = [
            '_create' => $_options
        ];

        $result = [];

        $result['_create'] = $_defaults['_create'];

        foreach ($fields as $name => $options) {
            if (is_array($options)) {
                $result[$name] = array_merge($_options, $options);
            } else {
                $result[$options] = $_options;
            }
        }
        return $result;
    }
protected function _normalizeFormFields($fields)
    {
        $_options = [
            'on' => 'both'
        ];

        $_defaults = [
            '_create' => $_options
        ];

        $result = [];

        $result['_create'] = $_defaults['_create'];

        foreach ($fields as $name => $options) {
            if (is_array($options)) {
                $result[$name] = array_merge($_options, $options);
            } else {
                $result[$options] = $_options;
            }
        }
        return $result;
    }
protected function _normalizeFormFields ( $ fields ) { $ _options = [ 'on' => 'both' ] ; $ _defaults = [ '_create' => $ _options ] ; $ result = [ ] ; $ result [ '_create' ] = $ _defaults [ '_create' ] ; foreach ( $ fields as $ name => $ options ) { if ( is_array ( $ options ) ) { $ result [ $ name ] = array_merge ( $ _options , $ options ) ; } else { $ result [ $ options ] = $ _options ; } } return $ result ; }
Normalizes the formfields-array.

@param array $fields Fields to normalize.
@return array
Normalizes the formfields - array .