You are here

public function ChoiceFormField::isDisabled in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dom-crawler/Field/ChoiceFormField.php \Symfony\Component\DomCrawler\Field\ChoiceFormField::isDisabled()

Check if the current selected option is disabled.

Return value

bool

Overrides FormField::isDisabled

File

vendor/symfony/dom-crawler/Field/ChoiceFormField.php, line 60

Class

ChoiceFormField
ChoiceFormField represents a choice form field.

Namespace

Symfony\Component\DomCrawler\Field

Code

public function isDisabled() {
  foreach ($this->options as $option) {
    if ($option['value'] == $this->value && $option['disabled']) {
      return true;
    }
  }
  return false;
}