public function ChoiceFormField::containsOption in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dom-crawler/Field/ChoiceFormField.php \Symfony\Component\DomCrawler\Field\ChoiceFormField::containsOption()
Checks whether given value is in the existing options.
Parameters
string $optionValue:
array $options:
Return value
bool
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 277
Class
- ChoiceFormField
- ChoiceFormField represents a choice form field.
Namespace
Symfony\Component\DomCrawler\FieldCode
public function containsOption($optionValue, $options) {
if ($this->validationDisabled) {
return true;
}
foreach ($options as $option) {
if ($option['value'] == $optionValue) {
return true;
}
}
return false;
}