function WizardTest::stepOneSubmit

Same name in other branches
  1. 4.0.x tests/modules/ctools_wizard_test/src/Wizard/WizardTest.php \Drupal\ctools_wizard_test\Wizard\WizardTest::stepOneSubmit()

Submission callback for the first step.

File

tests/modules/ctools_wizard_test/src/Wizard/WizardTest.php, line 59

Class

WizardTest

Namespace

Drupal\ctools_wizard_test\Wizard

Code

public function stepOneSubmit($form, FormStateInterface $form_state) {
    $cached_values = $form_state->getTemporaryValue('wizard');
    if ($form_state->getValue('one') == 'magic') {
        $cached_values['one'] = 'Abraham';
    }
    $form_state->setTemporaryValue('wizard', $cached_values);
}