public function MenuLinkContent::getDeleteRoute in Drupal 8
Same name and namespace in other branches
- 9 core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent::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 MenuLinkBase::getDeleteRoute
File
- core/
modules/ menu_link_content/ src/ Plugin/ Menu/ MenuLinkContent.php, line 198
Class
- MenuLinkContent
- Provides the menu link plugin for content menu links.
Namespace
Drupal\menu_link_content\Plugin\MenuCode
public function getDeleteRoute() {
return $this
->getEntity()
->toUrl('delete-form');
}