src/fieldwork/Form.php
function getValues ($useName = true, $includeDataFields = true)
    {
        $values = array();
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            if ($field->getCollectData()) {
                $key          = $useName ? $field->getName() : $field->getLocalSlug();
                $values[$key] = $field->getValue();
            }
        if ($includeDataFields)
            $values = array_merge($values, $this->dataFields);
        return $values;
    }
function getValues ($useName = true, $includeDataFields = true)
    {
        $values = array();
        foreach ($this->getFields() as $field)
            /* @var $field Field */
            if ($field->getCollectData()) {
                $key          = $useName ? $field->getName() : $field->getLocalSlug();
                $values[$key] = $field->getValue();
            }
        if ($includeDataFields)
            $values = array_merge($values, $this->dataFields);
        return $values;
    }
function getValues ( $ useName = true , $ includeDataFields = true ) { $ values = array ( ) ; foreach ( $ this -> getFields ( ) as $ field ) /* @var $field Field */ if ( $ field -> getCollectData ( ) ) { $ key = $ useName ? $ field -> getName ( ) : $ field -> getLocalSlug ( ) ; $ values [ $ key ] = $ field -> getValue ( ) ; } if ( $ includeDataFields ) $ values = array_merge ( $ values , $ this -> dataFields ) ; return $ values ; }
Gets a complete associated array containing all the data that needs to be stored

@param bool $useName           Whether to use the field name (if not, the fields shorter local slug is used)
@param bool $includeDataFields Whether to include the data fields

@return array
Gets a complete associated array containing all the data that needs to be stored