public function MenuLinkContent::getEditRoute 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::getEditRoute()
- 10 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 205
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();
}