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