MenuLinkTreeElement::$depth

The depth of this link relative to the root of the tree. Type: int File core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php, line 49 Class MenuLinkTreeElement Provides a value object to model an element in a menu link tree. Namespace Drupal\Core\Menu Code public $depth;

MenuLinkTreeElement::$access

Whether this link is accessible by the current user. If the value is NULL the access was not determined yet, if an access result object, it was determined already. Type: \Drupal\Core\Access\AccessResultInterface|null File core/lib/Drupal/Core/Menu/MenuLinkTreeElement.php, line 73 Class MenuLinkTreeElement Provides a value object to model an element in a menu link tree. Namespace Drupal\Core\Menu Code public $access;

MenuLinkTreeElement

Provides a value object to model an element in a menu link tree. \Drupal\Core\Menu\MenuLinkTreeElement objects represent a menu link's data. Objects of this class provide complimentary data: the placement in a tree. Therefore, we can summarize this split as follows: Menu link objects contain all information about an individual menu link, plus what their parent is. But they don't know where exactly in a menu link tree they live. Instances of this class are complimentary to those objects, they kn

MenuLinkTree::__construct

public MenuLinkTree::__construct(MenuTreeStorageInterface $tree_storage, MenuLinkManagerInterface $menu_link_manager, RouteProviderInterface $route_provider, MenuActiveTrailInterface $menu_active_trail, ControllerResolverInterface $controller_resolver) Constructs a \Drupal\Core\Menu\MenuLinkTree object. Parameters \Drupal\Core\Menu\MenuTreeStorageInterface $tree_storage: The menu link tree storage. \Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager: The menu link plugin manager. \Dr

MenuLinkTree::transform

public MenuLinkTree::transform(array $tree, array $manipulators) Applies menu link tree manipulators to transform the given tree. Parameters \Drupal\Core\Menu\MenuLinkTreeElement[] $tree: The menu tree to manipulate. array $manipulators: The menu link tree manipulators to apply. Each is an array with keys: callable: a callable or a string that can be resolved to a callable by \Drupal\Core\Controller\ControllerResolverInterface::getControllerFromDefinition() args: optional array of arguments

MenuLinkTree::maxDepth

public MenuLinkTree::maxDepth() Returns the maximum depth of tree that is supported. Return value int The maximum depth. Overrides MenuLinkTreeInterface::maxDepth File core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 280 Class MenuLinkTree Implements the loading, transforming and rendering of menu link trees. Namespace Drupal\Core\Menu Code public function maxDepth() { return $this->treeStorage->maxDepth(); }

MenuLinkTree::load

public MenuLinkTree::load($menu_name, MenuTreeParameters $parameters) Loads a menu tree with a menu link plugin instance at each element. Parameters string $menu_name: The name of the menu. \Drupal\Core\Menu\MenuTreeParameters $parameters: The parameters to determine which menu links to be loaded into a tree. Return value \Drupal\Core\Menu\MenuLinkTreeElement[] A menu link tree. Overrides MenuLinkTreeInterface::load File core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 88 Class MenuLinkTr

MenuLinkTree::getSubtreeHeight

public MenuLinkTree::getSubtreeHeight($id) Finds the height of a subtree rooted by of the given ID. Parameters string $id: The ID of an item in the storage. Return value int Returns the height of the subtree. This will be at least 1 if the ID exists, or 0 if the ID does not exist in the storage. Overrides MenuLinkTreeInterface::getSubtreeHeight File core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 287 Class MenuLinkTree Implements the loading, transforming and rendering of menu link tree

MenuLinkTree::getExpanded

public MenuLinkTree::getExpanded($menu_name, array $parents) Finds expanded links in a menu given a set of possible parents. Parameters string $menu_name: The menu name. array $parents: One or more parent IDs to match. Return value array The menu link IDs that are flagged as expanded in this menu. Overrides MenuLinkTreeInterface::getExpanded File core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 294 Class MenuLinkTree Implements the loading, transforming and rendering of menu link trees.

MenuLinkTree::getCurrentRouteMenuTreeParameters

public MenuLinkTree::getCurrentRouteMenuTreeParameters($menu_name) Gets the link tree parameters for rendering a specific menu. Builds menu link tree parameters that: Expand all links in the active trail based on route being viewed. Expand the descendents of the links in the active trail whose 'expanded' flag is enabled. This only sets the (relatively complex) parameters to achieve the two above goals, but you can still further customize these parameters. Parameters string $menu_name: The me