function BookManagerInterface::bookTreeAllData
Same name in other branches
- 8.9.x core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::bookTreeAllData()
- 10 core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::bookTreeAllData()
- 11.x core/modules/book/src/BookManagerInterface.php \Drupal\book\BookManagerInterface::bookTreeAllData()
Gets the data structure representing a named menu tree.
Since this can be the full tree including hidden items, the data returned may be used for generating an admin interface or a select.
Note: based on menu_tree_all_data().
Parameters
int $bid: The Book ID to find links for.
array|null $link: (optional) A fully loaded menu link, or NULL. If a link is supplied, only the path to root will be included in the returned tree - as if this link represented the current page in a visible menu.
int|null $max_depth: (optional) Maximum depth of links to retrieve. Typically useful if only one or two levels of a sub tree are needed in conjunction with a non-NULL $link, in which case $max_depth should be greater than $link['depth'].
Return value
array A tree of menu links in an array, in the order they should be rendered.
1 method overrides BookManagerInterface::bookTreeAllData()
- BookManager::bookTreeAllData in core/
modules/ book/ src/ BookManager.php - Gets the data structure representing a named menu tree.
File
-
core/
modules/ book/ src/ BookManagerInterface.php, line 36
Class
- BookManagerInterface
- Provides an interface defining a book manager.
Namespace
Drupal\bookCode
public function bookTreeAllData($bid, $link = NULL, $max_depth = NULL);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.