Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / web / core / modules / menu_link_content / src / Form / MenuLinkContentDeleteForm.php
1 <?php
2
3 namespace Drupal\menu_link_content\Form;
4
5 use Drupal\Core\Entity\ContentEntityDeleteForm;
6 use Drupal\Core\Url;
7
8 /**
9  * Provides a delete form for content menu links.
10  *
11  * @internal
12  */
13 class MenuLinkContentDeleteForm extends ContentEntityDeleteForm {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function getCancelUrl() {
19     if ($this->moduleHandler->moduleExists('menu_ui')) {
20       return new Url('entity.menu.edit_form', ['menu' => $this->entity->getMenuName()]);
21     }
22     return $this->entity->urlInfo();
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   protected function getRedirectUrl() {
29     return $this->getCancelUrl();
30   }
31
32   /**
33    * {@inheritdoc}
34    */
35   protected function getDeletionMessage() {
36     return $this->t('The menu link %title has been deleted.', ['%title' => $this->entity->label()]);
37   }
38
39 }