protected function getFieldsFromDataArray(array $fieldsArray)
    {
        $fields = array();
        foreach ($fieldsArray as $fieldArray) {
            $field = new Field();

            if (isset($fieldArray['name']) && is_string($fieldArray['name'])) {
                $field->setName($fieldArray['name']);
            }

            if (isset($fieldArray['type']) && is_string($fieldArray['type'])) {
                $field->setType($fieldArray['type']);
            }

            if (isset($fieldArray['value'])) {
                $field->setValue($fieldArray['value']);
            }

            $fields[] = $field;
        }

        return $fields;
    }