You are here

public function BookManagerInterface::bookTreeAllData in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 an admin interface or a select.

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.

Note: based on menu_tree_all_data().

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 42
Contains \Drupal\book\BookManagerInterface.

Class

BookManagerInterface
Provides an interface defining a book manager.

Namespace

Drupal\book

Code

public function bookTreeAllData($bid, $link = NULL, $max_depth = NULL);