public function MenuLinkTreeInterface::build in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php \Drupal\Core\Menu\MenuLinkTreeInterface::build()
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.
1 method overrides MenuLinkTreeInterface::build()
- MenuLinkTree::build in core/
lib/ Drupal/ Core/ Menu/ MenuLinkTree.php - Builds a renderable array from a menu tree.
File
- core/
lib/ Drupal/ Core/ Menu/ MenuLinkTreeInterface.php, line 99 - Contains \Drupal\Core\Menu\MenuLinkTreeInterface.
Class
- MenuLinkTreeInterface
- Defines an interface for loading, transforming and rendering menu link trees.
Namespace
Drupal\Core\MenuCode
public function build(array $tree);