function ChoiceFormField::containsOption
Checks whether given value is in the existing options.
@internal
1 call to ChoiceFormField::containsOption()
- ChoiceFormField::setValue in vendor/
symfony/ dom-crawler/ Field/ ChoiceFormField.php - Sets the value of the field.
File
-
vendor/
symfony/ dom-crawler/ Field/ ChoiceFormField.php, line 251
Class
- ChoiceFormField
- ChoiceFormField represents a choice form field.
Namespace
Symfony\Component\DomCrawler\FieldCode
public function containsOption(string $optionValue, array $options) : bool {
if ($this->validationDisabled) {
return true;
}
foreach ($options as $option) {
if ($option['value'] == $optionValue) {
return true;
}
}
return false;
}