ac531c38503b8bb0c0f817282f96c941abc09e03
[yaffs-website] / Form / EntityBrowserDeleteForm.php
1 <?php
2
3 namespace Drupal\entity_browser\Form;
4
5 use Drupal\Core\Entity\EntityDeleteForm;
6 use Drupal\Core\Url;
7
8 /**
9  * Delete confirm form for entity browsers.
10  */
11 class EntityBrowserDeleteForm extends EntityDeleteForm {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getQuestion() {
17     return $this->t(
18       'Are you sure you want to delete entity browser %label?',
19       ['%label' => $this->entity->label()]
20     );
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public function getConfirmText() {
27     return $this->t('Delete Entity Browser');
28   }
29
30   /**
31    * {@inheritdoc}
32    */
33   public function getCancelUrl() {
34     return new Url('entity.entity_browser.collection');
35   }
36
37   /**
38    * {@inheritdoc}
39    */
40   protected function getDeletionMessage() {
41     return $this->t(
42       'Entity browser %label was deleted.',
43       ['%label' => $this->entity->label()]
44     );
45   }
46
47 }