function WizardTest::finish

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

Overrides FormWizardBase::finish

File

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

Class

WizardTest

Namespace

Drupal\ctools_wizard_test\Wizard

Code

public function finish(array &$form, FormStateInterface $form_state) {
    $cached_values = $form_state->getTemporaryValue('wizard');
    $this->messenger()
        ->addMessage($this->t('Value One: @one', [
        '@one' => $cached_values['one'],
    ]));
    $this->messenger()
        ->addMessage($this->t('Value Two: @two', [
        '@two' => $cached_values['two'],
    ]));
    parent::finish($form, $form_state);
}