You are here

public function MenuLinkContent::getTranslateRoute in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent::getTranslateRoute()

Returns route information for a route to translate 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 translatable).

Overrides MenuLinkBase::getTranslateRoute

File

core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php, line 195
Contains \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent.

Class

MenuLinkContent
Provides the menu link plugin for content menu links.

Namespace

Drupal\menu_link_content\Plugin\Menu

Code

public function getTranslateRoute() {
  return $this
    ->getEntity()
    ->urlInfo('drupal:content-translation-overview');
}