protected function normalizeFieldTypes(array &$fields)
    {
        foreach ($fields as $rkey => &$value) {
            $value['fieldname'] = $rkey;

            if ($value['type'] === 'select' && isset($value['multiple']) && $value['multiple'] === true) {
                $value['type'] = 'selectmultiple';
            }

            if (isset($this->typemap[$value['type']])) {
                $value['fieldtype'] = $this->typemap[$value['type']];
            } else {
                $value['fieldtype'] = $this->typemap['text'];
            }
        }
    }
protected function normalizeFieldTypes(array &$fields)
    {
        foreach ($fields as $rkey => &$value) {
            $value['fieldname'] = $rkey;

            if ($value['type'] === 'select' && isset($value['multiple']) && $value['multiple'] === true) {
                $value['type'] = 'selectmultiple';
            }

            if (isset($this->typemap[$value['type']])) {
                $value['fieldtype'] = $this->typemap[$value['type']];
            } else {
                $value['fieldtype'] = $this->typemap['text'];
            }
        }
    }
protected function normalizeFieldTypes ( array & $ fields ) { foreach ( $ fields as $ rkey => & $ value ) { $ value [ 'fieldname' ] = $ rkey ; if ( $ value [ 'type' ] === 'select' && isset ( $ value [ 'multiple' ] ) && $ value [ 'multiple' ] === true ) { $ value [ 'type' ] = 'selectmultiple' ; } if ( isset ( $ this -> typemap [ $ value [ 'type' ] ] ) ) { $ value [ 'fieldtype' ] = $ this -> typemap [ $ value [ 'type' ] ] ; } else { $ value [ 'fieldtype' ] = $ this -> typemap [ 'text' ] ; } } }
Internal method to fix or patch any field mappings

@param array $fields
Internal method to fix or patch any field mappings