Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MenuLinkTree.php

function MenuLinkTree::load

Overrides MenuLinkTreeInterface::load

File

core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 62

Class

MenuLinkTree
Implements the loading, transforming and rendering of menu link trees.

Namespace

Drupal\Core\Menu

Code

public function load($menu_name, MenuTreeParameters $parameters) {
    $data = $this->treeStorage
        ->loadTreeData($menu_name, $parameters);
    // Pre-load all the route objects in the tree for access checks.
    if ($data['route_names'] && $this->routeProvider instanceof PreloadableRouteProviderInterface) {
        $this->routeProvider
            ->getRoutesByNames($data['route_names']);
    }
    return $this->createInstances($data['tree']);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal