function Form::getValues
Gets the field values.
The returned array does not include file fields (
See also
getFiles).
2 calls to Form::getValues()
- Form::getPhpValues in vendor/
symfony/ dom-crawler/ Form.php - Gets the field values as PHP.
- Form::getUri in vendor/
symfony/ dom-crawler/ Form.php - Gets the URI of the form.
File
-
vendor/
symfony/ dom-crawler/ Form.php, line 75
Class
- Form
- Form represents an HTML form.
Namespace
Symfony\Component\DomCrawlerCode
public function getValues() : array {
$values = [];
foreach ($this->fields
->all() as $name => $field) {
if ($field->isDisabled()) {
continue;
}
if (!$field instanceof Field\FileFormField && $field->hasValue()) {
$values[$name] = $field->getValue();
}
}
return $values;
}