public function PanelizerWizardContextDeleteForm::submitForm in Panelizer 8.3
Same name and namespace in other branches
- 8.5 src/Form/PanelizerWizardContextDeleteForm.php \Drupal\panelizer\Form\PanelizerWizardContextDeleteForm::submitForm()
- 8.4 src/Form/PanelizerWizardContextDeleteForm.php \Drupal\panelizer\Form\PanelizerWizardContextDeleteForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides ContextDelete::submitForm
File
- src/
Form/ PanelizerWizardContextDeleteForm.php, line 45
Class
- PanelizerWizardContextDeleteForm
- Provides a form for deleting a context.
Namespace
Drupal\panelizer\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$cached_values = $this
->getTempstore();
$context = $cached_values['contexts'][$this->context_id];
drupal_set_message($this
->t('The static context %label has been removed.', [
'%label' => $context['label'],
]));
unset($cached_values['contexts'][$this->context_id]);
$this
->setTempstore($cached_values);
parent::submitForm($form, $form_state);
}