function WorkflowDeleteForm::submitForm
Same name in other branches
- 9 core/modules/workflows/src/Form/WorkflowDeleteForm.php \Drupal\workflows\Form\WorkflowDeleteForm::submitForm()
- 10 core/modules/workflows/src/Form/WorkflowDeleteForm.php \Drupal\workflows\Form\WorkflowDeleteForm::submitForm()
- 11.x core/modules/workflows/src/Form/WorkflowDeleteForm.php \Drupal\workflows\Form\WorkflowDeleteForm::submitForm()
Overrides EntityForm::submitForm
File
-
core/
modules/ workflows/ src/ Form/ WorkflowDeleteForm.php, line 53
Class
- WorkflowDeleteForm
- Builds the form to delete Workflow entities.
Namespace
Drupal\workflows\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->entity
->delete();
$this->messenger()
->addStatus($this->t('Workflow %label deleted.', [
'%label' => $this->entity
->label(),
]));
$form_state->setRedirectUrl($this->getCancelUrl());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.