MenuLinkTreeInterface::build

public MenuLinkTreeInterface::build(array $tree)

Builds a renderable array from a menu tree.

The menu item's LI element is given one of the following classes:

  • expanded: The menu item is showing its submenu.
  • collapsed: The menu item has a submenu that is not shown.
  • leaf: The menu item has no submenu.

Parameters

\Drupal\Core\Menu\MenuLinkTreeElement[] $tree: A data structure representing the tree, as returned from MenuLinkTreeInterface::load().

Return value

array A renderable array.

File

core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php, line 94

Class

MenuLinkTreeInterface
Defines an interface for loading, transforming and rendering menu link trees.

Namespace

Drupal\Core\Menu

Code

public function build(array $tree);
doc_Drupal
2016-10-29 09:27:21
Comments
Leave a Comment

Please login to continue.