public function MenuLink::setRouteObject

Sets the route object for this link.

This should only be called by MenuLinkStorageController when loading the link object. Calling it at other times could result in unpredictable behavior.

Parameters

\Symfony\Component\Routing\Route $route:

Overrides MenuLinkInterface::setRouteObject

File

drupal/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php, line 300
Contains \Drupal\menu_link\Plugin\Core\Entity\MenuLink.

Class

MenuLink
Defines the menu link entity class.

Namespace

Drupal\menu_link\Plugin\Core\Entity

Code

public function setRouteObject(Route $route) {
  $this->routeObject = $route;
}