FormStateValuesTrait::hasValue

public FormStateValuesTrait::hasValue($key)

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\Form

Code

1
2
3
4
5
public function hasValue($key) {
  $exists = NULL;
  $value = NestedArray::getValue($this->getValues(), (array) $key, $exists);
  return $exists && isset($value);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.