BookManagerInterface::bookTreeAllData

public BookManagerInterface::bookTreeAllData($bid, $link = NULL, $max_depth = NULL)

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 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 An tree of menu links in an array, in the order they should be rendered.

File

core/modules/book/src/BookManagerInterface.php, line 37

Class

BookManagerInterface
Provides an interface defining a book manager.

Namespace

Drupal\book

Code

public function bookTreeAllData($bid, $link = NULL, $max_depth = NULL);
doc_Drupal
2016-10-29 08:48:14
Comments
Leave a Comment

Please login to continue.