collection as $field) { $res[$field->name] = $field->value; } return $res; } }