src/FormView.php
public function getFlattenedFields()
    {
        if (!isset($this->flatFields)) {
            $this->flatFields = [];

            foreach ($this->fields as $field) {
                if (isset($field['fields']) && is_array($field['fields'])) {
                    $this->flatFields += $this->flattenCollection($field);
                } else {
                    $this->flatFields[$field['name']] = $field;
                }
            }
        }

        return $this->flatFields;
    }
public function getFlattenedFields()
    {
        if (!isset($this->flatFields)) {
            $this->flatFields = [];

            foreach ($this->fields as $field) {
                if (isset($field['fields']) && is_array($field['fields'])) {
                    $this->flatFields += $this->flattenCollection($field);
                } else {
                    $this->flatFields[$field['name']] = $field;
                }
            }
        }

        return $this->flatFields;
    }
public function getFlattenedFields ( ) { if ( ! isset ( $ this -> flatFields ) ) { $ this -> flatFields = [ ] ; foreach ( $ this -> fields as $ field ) { if ( isset ( $ field [ 'fields' ] ) && is_array ( $ field [ 'fields' ] ) ) { $ this -> flatFields += $ this -> flattenCollection ( $ field ) ; } else { $ this -> flatFields [ $ field [ 'name' ] ] = $ field ; } } } return $ this -> flatFields ; }
Flatten all fields by moving collections into the main array

@return array
Flatten all fields by moving collections into the main array