diff --git a/modules/workflows/src/Form/WorkflowDeleteForm.php b/modules/workflows/src/Form/WorkflowDeleteForm.php index 51a0bdd976..627b60570b 100644 --- a/modules/workflows/src/Form/WorkflowDeleteForm.php +++ b/modules/workflows/src/Form/WorkflowDeleteForm.php @@ -2,7 +2,7 @@ namespace Drupal\workflows\Form; -use Drupal\Core\Entity\EntityConfirmFormBase; +use Drupal\Core\Entity\EntityDeleteForm; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; @@ -11,7 +11,7 @@ use Drupal\Core\Url; * * @internal */ -class WorkflowDeleteForm extends EntityConfirmFormBase { +class WorkflowDeleteForm extends EntityDeleteForm { /** * {@inheritdoc} @@ -33,20 +33,6 @@ class WorkflowDeleteForm extends EntityConfirmFormBase { return $this->t('Are you sure you want to delete %name?', ['%name' => $this->entity->label()]); } - /** - * {@inheritdoc} - */ - public function getCancelUrl() { - return new Url('entity.workflow.collection'); - } - - /** - * {@inheritdoc} - */ - public function getConfirmText() { - return $this->t('Delete'); - } - /** * {@inheritdoc} */ @@ -57,8 +43,7 @@ class WorkflowDeleteForm extends EntityConfirmFormBase { 'Workflow %label deleted.', ['%label' => $this->entity->label()] )); - $form_state->setRedirectUrl($this->getCancelUrl()); } -} +} \ No newline at end of file