function FormStateValuesTrait::setValue

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Form/FormStateValuesTrait.php \Drupal\Core\Form\FormStateValuesTrait::setValue()
  2. 8.9.x core/lib/Drupal/Core/Form/FormStateValuesTrait.php \Drupal\Core\Form\FormStateValuesTrait::setValue()
  3. 10 core/lib/Drupal/Core/Form/FormStateValuesTrait.php \Drupal\Core\Form\FormStateValuesTrait::setValue()

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

1 call to FormStateValuesTrait::setValue()
FormStateValuesTrait::setValueForElement in core/lib/Drupal/Core/Form/FormStateValuesTrait.php
Implements \Drupal\Core\Form\FormStateInterface::setValueForElement()

File

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

Class

FormStateValuesTrait
Provides methods to manage form state values.

Namespace

Drupal\Core\Form

Code

public function setValue($key, $value) {
    NestedArray::setValue($this->getValues(), (array) $key, $value, TRUE);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.