public function MenuLinkContent::getEditRoute in Drupal 9
Same name and namespace in other branches
- 8 core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent::getEditRoute()
Returns route information for a custom edit form for the menu link.
Plugins should return a value here if they have a special edit form, or if they need to define additional local tasks, local actions, etc. that are visible from the edit form.
Return value
\Drupal\Core\Url|null A Url object, or NULL if there is no route because there is no custom edit route for this instance.
Overrides MenuLinkBase::getEditRoute
File
- core/
modules/ menu_link_content/ src/ Plugin/ Menu/ MenuLinkContent.php, line 194
Class
- MenuLinkContent
- Provides the menu link plugin for content menu links.
Namespace
Drupal\menu_link_content\Plugin\MenuCode
public function getEditRoute() {
return $this
->getEntity()
->toUrl();
}