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