function FormStateValuesTrait::hasValue
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Form/FormStateValuesTrait.php \Drupal\Core\Form\FormStateValuesTrait::hasValue()
- 10 core/lib/Drupal/Core/Form/FormStateValuesTrait.php \Drupal\Core\Form\FormStateValuesTrait::hasValue()
- 11.x core/lib/Drupal/Core/Form/FormStateValuesTrait.php \Drupal\Core\Form\FormStateValuesTrait::hasValue()
Implements \Drupal\Core\Form\FormStateInterface::hasValue()
File
-
core/
lib/ Drupal/ Core/ Form/ FormStateValuesTrait.php, line 61
Class
- FormStateValuesTrait
- Provides methods to manage form state values.
Namespace
Drupal\Core\FormCode
public function hasValue($key) {
$exists = NULL;
$value = NestedArray::getValue($this->getValues(), (array) $key, $exists);
return $exists && isset($value);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.