You are here

public function MenuTreeStorageInterface::loadByRoute in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php \Drupal\Core\Menu\MenuTreeStorageInterface::loadByRoute()

Loads multiple plugin definitions from the storage based on route.

Parameters

string $route_name: The route name.

array $route_parameters: (optional) The route parameters. Defaults to an empty array.

string $menu_name: (optional) Restricts the found links to just those in the named menu.

Return value

array An array of menu link definitions keyed by ID and ordered by depth.

1 method overrides MenuTreeStorageInterface::loadByRoute()
MenuTreeStorage::loadByRoute in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads multiple plugin definitions from the storage based on route.

File

core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php, line 89

Class

MenuTreeStorageInterface
Defines an interface for storing a menu tree containing menu link IDs.

Namespace

Drupal\Core\Menu

Code

public function loadByRoute($route_name, array $route_parameters = [], $menu_name = NULL);