You are here

public function SubFormState::setFormState in Authorization 8

Sets the value of the form state.

Parameters

array $form_state_additions: An array of values to add to the form state.

Return value

$this

Overrides FormStateInterface::setFormState

File

src/Form/SubFormState.php, line 148

Class

SubFormState
Represents the form state of a sub-form.

Namespace

Drupal\authorization\Form

Code

public function setFormState(array $form_state_additions) {
  foreach ($form_state_additions as $key => $value) {
    $this
      ->set($key, $value);
  }
  return $this;
}