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::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::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::checkNodeIsRemovable

public BookManager::checkNodeIsRemovable(NodeInterface $node) Determines if a node can be removed from the book. A node can be removed from a book if it is actually in a book and it either is not a top-level page or is a top-level page with no children. Parameters \Drupal\node\NodeInterface $node: The node to remove from the outline. Return value bool TRUE if a node can be removed from the book, FALSE otherwise. Overrides BookManagerInterface::checkNodeIsRemovable File core/modules/book/src/B

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::addParentSelectFormElements

protected BookManager::addParentSelectFormElements(array $book_link) Builds the parent selection form element for the node form or outline tab. This function is also called when generating a new set of options during the Ajax callback, so an array is returned that can be used to replace an existing form element. Parameters array $book_link: A fully loaded book link that is part of the book hierarchy. Return value array A parent selection form element. File core/modules/book/src/BookManager.ph

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