FormStateValuesTrait::getValue

public &FormStateValuesTrait::getValue($key, $default = NULL)

Implements \Drupal\Core\Form\FormStateInterface::getValue()

File

core/lib/Drupal/Core/Form/FormStateValuesTrait.php, line 24

Class

FormStateValuesTrait
Provides methods to manage form state values.

Namespace

Drupal\Core\Form

Code

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

Please login to continue.