You are here

public function PanelizerAddWizard::finish in Panelizer 8.4

Same name and namespace in other branches
  1. 8.5 src/Wizard/PanelizerAddWizard.php \Drupal\panelizer\Wizard\PanelizerAddWizard::finish()
  2. 8.3 src/Wizard/PanelizerAddWizard.php \Drupal\panelizer\Wizard\PanelizerAddWizard::finish()

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 PanelizerWizardBase::finish

File

src/Wizard/PanelizerAddWizard.php, line 66

Class

PanelizerAddWizard

Namespace

Drupal\panelizer\Wizard

Code

public function finish(array &$form, FormStateInterface $form_state) {
  parent::finish($form, $form_state);
  $cached_values = $form_state
    ->getTemporaryValue('wizard');
  $form_state
    ->setRedirect('panelizer.wizard.edit', [
    'machine_name' => $cached_values['id'],
    'step' => 'content',
  ]);
}