3 namespace Drupal\menu_link_content\Form;
5 use Drupal\Core\Entity\ContentEntityDeleteForm;
9 * Provides a delete form for content menu links.
13 class MenuLinkContentDeleteForm extends ContentEntityDeleteForm {
18 public function getCancelUrl() {
19 if ($this->moduleHandler->moduleExists('menu_ui')) {
20 return new Url('entity.menu.edit_form', ['menu' => $this->entity->getMenuName()]);
22 return $this->entity->urlInfo();
28 protected function getRedirectUrl() {
29 return $this->getCancelUrl();
35 protected function getDeletionMessage() {
36 return $this->t('The menu link %title has been deleted.', ['%title' => $this->entity->label()]);