public function TemplateDeleteForm::submitForm in Workbench Email 8
Same name and namespace in other branches
- 2.x src/Form/TemplateDeleteForm.php \Drupal\workbench_email\Form\TemplateDeleteForm::submitForm()
Overrides EntityDeleteFormTrait::submitForm
File
- src/
Form/ TemplateDeleteForm.php, line 63
Class
- TemplateDeleteForm
- Builds the form to delete Email Template entities.
Namespace
Drupal\workbench_email\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->entity
->delete();
$this->messenger
->addStatus($this
->t('Template @label deleted.', [
'@label' => $this->entity
->label(),
]));
$form_state
->setRedirectUrl($this
->getCancelUrl());
}