BookManager::buildItems

protected BookManager::buildItems(array $tree) Builds the #items property for a book tree's renderable array. Helper function for ::bookTreeOutput(). Parameters array $tree: A data structure representing the tree. Return value array The value to use for the #items property of a renderable menu. File core/modules/book/src/BookManager.php, line 533 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function buildItems(array $tree) { $items = []; foreach

BookManager::buildBookOutlineRecursive

protected BookManager::buildBookOutlineRecursive(&$links, $parents, $depth) Builds the data representing a book tree. The function is a bit complex because the rendering of a link depends on the next book link. Parameters array $links: A flat array of book links that are part of the book. Each array element is an associative array of information about the book link, containing the fields from the {book} table. This array must be ordered depth-first. array $parents: An array of the node ID

BookManager::buildBookOutlineData

protected BookManager::buildBookOutlineData(array $links, array $parents = array(), $depth = 1) Sorts and returns the built data representing a book tree. Parameters array $links: A flat array of book links that are part of the book. Each array element is an associative array of information about the book link, containing the fields from the {book} table. This array must be ordered depth-first. array $parents: An array of the node ID values that are in the path from the current page to the roo

BookManager::BOOK_MAX_DEPTH

Defines the maximum supported depth of the book tree. File core/modules/book/src/BookManager.php, line 26 Class BookManager Defines a book manager. Namespace Drupal\book Code const BOOK_MAX_DEPTH = 9;

BookManager::bookTreeOutput

public BookManager::bookTreeOutput(array $tree) Returns a rendered 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 which is not shown. Parameters array $tree: A data structure representing the tree as returned from buildBookOutlineData. Return value array A structured array to be rendered by drupal_render(). Overrides BookManagerInterface::bookTreeOutput See also \Drupal\Co

BookManager::bookTreeGetFlat

public BookManager::bookTreeGetFlat(array $book_link) Gets the book for a page and returns it as a linear array. Parameters array $book_link: A fully loaded book link that is part of the book hierarchy. Return value array A linear array of book links in the order that the links are shown in the book, so the previous and next pages are the elements before and after the element corresponding to the current node. The children of the current node (if any) will come immediately after it in the arr

BookManager::bookTreeCollectNodeLinks

public BookManager::bookTreeCollectNodeLinks(&$tree, &$node_links) Collects node links from a given menu tree recursively. Parameters array $tree: The menu tree you wish to collect node links from. array $node_links: An array in which to store the collected node links. Overrides BookManagerInterface::bookTreeCollectNodeLinks File core/modules/book/src/BookManager.php, line 688 Class BookManager Defines a book manager. Namespace Drupal\book Code public function bookTreeCollectN

BookManager::bookTreeCheckAccess

public BookManager::bookTreeCheckAccess(&$tree, $node_links = array()) Checks access and performs dynamic operations for each link in the tree. Parameters array $tree: The book tree you wish to operate on. array $node_links: A collection of node link references generated from $tree by menu_tree_collect_node_links(). Overrides BookManagerInterface::bookTreeCheckAccess File core/modules/book/src/BookManager.php, line 929 Class BookManager Defines a book manager. Namespace Drupal\book

BookManager::bookTreeBuild

protected BookManager::bookTreeBuild($bid, array $parameters = array()) Builds a book tree, translates links, and checks access. Parameters int $bid: The Book ID to find links for. array $parameters: (optional) An associative array of build parameters. Possible keys: expanded: An array of parent link IDs to return only book links that are children of one of the parent link IDs in this list. If empty, the whole outline is built, unless 'only_active_trail' is TRUE. active_trail: An array of no

BookManager::bookTreeAllData

public BookManager::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