function FormWizardBase::previous
Form submit handler to step backwards in the wizard.
"Next" steps are handled by \Drupal\Core\Form\FormInterface::submitForm().
Parameters
array $form: Drupal form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current form state of the wizard. This will not contain values from the current step since the previous button does not actually submit those values.
Overrides FormWizardInterface::previous
File
-
src/
Wizard/ FormWizardBase.php, line 323
Class
- FormWizardBase
- The base class for all form wizard.
Namespace
Drupal\ctools\WizardCode
public function previous(array &$form, FormStateInterface $form_state) {
$cached_values = $form_state->getTemporaryValue('wizard');
$form_state->setRedirect($this->getRouteName(), $this->getPreviousParameters($cached_values));
}