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