You are here

protected function KeyFormBase::moveFormStateStorage in Key 8

Moves storage variables from one form state to another.

Parameters

\Drupal\Core\Form\FormStateInterface $from: The form state object to move from.

\Drupal\Core\Form\FormStateInterface $to: The form state object to move to.

1 call to KeyFormBase::moveFormStateStorage()
KeyFormBase::validateForm in src/Form/KeyFormBase.php
Form validation handler.

File

src/Form/KeyFormBase.php, line 526

Class

KeyFormBase
Base form for key add and edit forms.

Namespace

Drupal\key\Form

Code

protected function moveFormStateStorage(FormStateInterface $from, FormStateInterface $to) {
  foreach ($from
    ->getStorage() as $index => $value) {
    $to
      ->set($index, $value);
  }
}