You are here

public function Link::getDeleteRoute in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Entity/Link.php \Drupal\colossal_menu\Entity\Link::getDeleteRoute()

Returns route information for a route to delete the menu link.

Return value

\Drupal\Core\Url|null A Url object, or NULL if there is no route (e.g. when the link is not deletable).

Overrides MenuLinkInterface::getDeleteRoute

File

src/Entity/Link.php, line 479

Class

Link
Defines the Link entity.

Namespace

Drupal\colossal_menu\Entity

Code

public function getDeleteRoute() {
  return Url::fromRoute('entity.colossal_menu_link.delete_form', [
    'colossal_menu' => $this
      ->getMenuName(),
    'colossal_menu_link' => $this
      ->id(),
  ]);
}