You are here

public function FormStateValuesTrait::getValue in Markdown 8.2

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

File

src/BcSupport/FormStateValuesTrait.php, line 25

Class

FormStateValuesTrait
Provides methods to manage form state values.

Namespace

Drupal\markdown\BcSupport

Code

public function &getValue($key, $default = NULL) {
  $exists = NULL;
  $value =& NestedArray::getValue($this
    ->getValues(), (array) $key, $exists);
  if (!$exists) {
    $value = $default;
  }
  return $value;
}