src/Helpers/Form.php
protected function getFieldValues($fields)
    {
        $result = array();
        foreach ($fields as $id => $field) {
            if (isset($field['value'])) {
                $result[$id] = $field['value'];
            }
            if (!empty($field['fields'])) {
                /** @noinspection SlowArrayOperationsInLoopInspection */
                $result = array_merge($result, $this->getFieldValues($field['fields']));
            }
        }
        return $result;
    }
protected function getFieldValues($fields)
    {
        $result = array();
        foreach ($fields as $id => $field) {
            if (isset($field['value'])) {
                $result[$id] = $field['value'];
            }
            if (!empty($field['fields'])) {
                /** @noinspection SlowArrayOperationsInLoopInspection */
                $result = array_merge($result, $this->getFieldValues($field['fields']));
            }
        }
        return $result;
    }
protected function getFieldValues ( $ fields ) { $ result = array ( ) ; foreach ( $ fields as $ id => $ field ) { if ( isset ( $ field [ 'value' ] ) ) { $ result [ $ id ] = $ field [ 'value' ] ; } if ( ! empty ( $ field [ 'fields' ] ) ) { /** @noinspection SlowArrayOperationsInLoopInspection */ $ result = array_merge ( $ result , $ this -> getFieldValues ( $ field [ 'fields' ] ) ) ; } } return $ result ; }
Returns the set of values directly assigned to the field definitions.

These take precedence over default values

@param array[] $fields

@return array An array of values keyed by the form field names.
An array of values keyed by the form field names.
Returns the set of values directly assigned to the field definitions .