public function WizardTest::finish in Chaos Tool Suite (ctools) 8.3
Form submit handler for finalizing the wizard values.
If you need to generate an entity or save config or raw table data subsequent to your form wizard, this is the responsible method.
Parameters
array $form: Drupal form array.
\Drupal\Core\Form\FormStateInterface $form_state: The final form state of the wizard.
Overrides FormWizardBase::finish
File
- tests/
modules/ ctools_wizard_test/ src/ Wizard/ WizardTest.php, line 75
Class
Namespace
Drupal\ctools_wizard_test\WizardCode
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);
}