BookManager::getTableOfContents

public BookManager::getTableOfContents($bid, $depth_limit, array $exclude = array()) Returns an array of book pages in table of contents order. Parameters int $bid: The ID of the book whose pages are to be listed. int $depth_limit: Any link deeper than this value will be excluded (along with its children). array $exclude: (optional) An array of menu link ID values. Any link whose menu link ID is in this array will be excluded (along with its children). Defaults to an empty array. Return value

BookManager::loadBookLink

public BookManager::loadBookLink($nid, $translate = TRUE) Loads a single book entry. The entries of a book entry is documented in \Drupal\book\BookOutlineStorageInterface::loadMultiple. If $translate is TRUE, it also checks access ('access' key) and loads the title from the node itself. Parameters int $nid: The node ID of the book. bool $translate: If TRUE, set access, title, and other elements. Return value array The book data of that node. Overrides BookManagerInterface::loadBookLink See al

BookManager::doBookTreeCheckAccess

protected BookManager::doBookTreeCheckAccess(&$tree) Sorts the menu tree and recursively checks access for each item. Parameters array $tree: The book tree to operate on. File core/modules/book/src/BookManager.php, line 956 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function doBookTreeCheckAccess(&$tree) { $new_tree = array(); foreach ($tree as $key => $v) { $item = &$tree[$key]['link']; $this->bookLinkTranslate($item);

BookManager::getActiveTrailIds

public BookManager::getActiveTrailIds($bid, $link) Gets the active trail IDs for the specified book at the provided path. Parameters string $bid: The Book ID to find links for. array $link: A fully loaded menu link. Return value array An array containing the active trail: a list of mlids. Overrides BookManagerInterface::getActiveTrailIds File core/modules/book/src/BookManager.php, line 486 Class BookManager Defines a book manager. Namespace Drupal\book Code public function getActiveT

BookManager::flatBookTree

protected BookManager::flatBookTree(array $tree, array &$flat) Recursively converts a tree of menu links to a flat array. Parameters array $tree: A tree of menu links in an array. array $flat: A flat array of the menu links from $tree, passed by reference. See also static::bookTreeGetFlat() File core/modules/book/src/BookManager.php, line 725 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function flatBookTree(array $tree, array &$flat) { for

BookManager::findChildrenRelativeDepth

protected BookManager::findChildrenRelativeDepth(array $book_link) Determine the relative depth of the children of a given book link. Parameters array $book_link: The book link. Return value int The difference between the max depth in the book tree and the depth of the passed book link. File core/modules/book/src/BookManager.php, line 148 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function findChildrenRelativeDepth(array $book_link) { $max_depth

BookManager::doBookTreeBuild

protected BookManager::doBookTreeBuild($bid, array $parameters = array()) Builds a book tree. This function may be used build the data for a menu tree only, for example to further massage the data manually before further processing happens. _menu_tree_check_access() needs to be invoked afterwards. 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 l

BookManager::deleteFromBook

public BookManager::deleteFromBook($nid) Deletes node's entry from book table. Parameters int $nid: The nid to delete. Overrides BookManagerInterface::deleteFromBook File core/modules/book/src/BookManager.php, line 431 Class BookManager Defines a book manager. Namespace Drupal\book Code public function deleteFromBook($nid) { $original = $this->loadBookLink($nid, FALSE); $this->bookOutlineStorage->delete($nid); if ($nid == $original['bid']) { // Handle deletion of a

BookManager::getAllBooks

public BookManager::getAllBooks() Returns an array of all books. This list may be used for generating a list of all the books, or for building the options for a form select. Return value array An array of all books. Overrides BookManagerInterface::getAllBooks File core/modules/book/src/BookManager.php, line 84 Class BookManager Defines a book manager. Namespace Drupal\book Code public function getAllBooks() { if (!isset($this->books)) { $this->loadBooks(); } return $th

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;