FormStateValuesTrait::isValueEmpty

public FormStateValuesTrait::isValueEmpty($key)

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

Code

public function isValueEmpty($key) {
  $exists = NULL;
  $value = NestedArray::getValue($this->getValues(), (array) $key, $exists);
  return !$exists || empty($value);
}
doc_Drupal
2016-10-29 09:16:47
Comments
Leave a Comment

Please login to continue.