BookManager::updateOutline

public BookManager::updateOutline(NodeInterface $node) Handles additions and updates to the book outline. This common helper function performs all additions and updates to the book outline through node addition, node editing, node deletion, or the outline tab. Parameters \Drupal\node\NodeInterface $node: The node that is being saved, added, deleted, or moved. Return value bool TRUE if the book link was saved; FALSE otherwise. Overrides BookManagerInterface::updateOutline File core/modules/boo

BookManager::loadBooks

protected BookManager::loadBooks() Loads Books Array. File core/modules/book/src/BookManager.php, line 94 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function loadBooks() { $this->books = array(); $nids = $this->bookOutlineStorage->getBooks(); if ($nids) { $book_links = $this->bookOutlineStorage->loadMultiple($nids); $nodes = $this->entityManager->getStorage('node')->loadMultiple($nids); // @todo: Sort by wei

BookManager::moveChildren

protected BookManager::moveChildren(array $link, array $original) Moves children from the original parent to the updated link. Parameters array $link: The link being saved. array $original: The original parent of $link. File core/modules/book/src/BookManager.php, line 826 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function moveChildren(array $link, array $original) { $p = 'p1'; $expressions = array(); for ($i = 1; $i <= $link['depth']; $p =

BookManager::loadBookLinks

public BookManager::loadBookLinks($nids, $translate = TRUE) Loads multiple book entries. 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[] $nids: An array of nids to load. bool $translate: If TRUE, set access, title, and other elements. Return value array[] The book data of each node keyed by NID. Overrides BookManagerInterfa

BookManager::recurseTableOfContents

protected BookManager::recurseTableOfContents(array $tree, $indent, array &$toc, array $exclude, $depth_limit) Recursively processes and formats book links for getTableOfContents(). This helper function recursively modifies the table of contents array for each item in the book tree, ignoring items in the exclude array or at a depth greater than the limit. Truncates titles over thirty characters and appends an indentation string incremented by depth. Parameters array $tree: The data structu

BookManager::saveBookLink

public BookManager::saveBookLink(array $link, $new) Saves a single book entry. Parameters array $link: The link data to save. bool $new: Is this a new book. Return value array The book data of that node. Overrides BookManagerInterface::saveBookLink File core/modules/book/src/BookManager.php, line 761 Class BookManager Defines a book manager. Namespace Drupal\book Code public function saveBookLink(array $link, $new) { // Keep track of Book IDs for cache clear. $affected_bids[$link

BookManager::setParents

protected BookManager::setParents(array &$link, array $parent) Sets the p1 through p9 properties for a book link being saved. Parameters array $link: The book link to update, passed by reference. array $parent: The parent values to set. File core/modules/book/src/BookManager.php, line 911 Class BookManager Defines a book manager. Namespace Drupal\book Code protected function setParents(array &$link, array $parent) { $i = 1; while ($i < $link['depth']) { $p = 'p' . $

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

public BookManager::getParentDepthLimit(array $book_link) Finds the depth limit for items in the parent select. Parameters array $book_link: A fully loaded menu link that is part of the book hierarchy. Return value int The depth limit for items in the parent select. Overrides BookManagerInterface::getParentDepthLimit File core/modules/book/src/BookManager.php, line 134 Class BookManager Defines a book manager. Namespace Drupal\book Code public function getParentDepthLimit(array $book

BookManager::getLinkDefaults

public BookManager::getLinkDefaults($nid) Returns an array with default values for a book page's menu link. Parameters string|int $nid: The ID of the node whose menu link is being created. Return value array The default values for the menu link. Overrides BookManagerInterface::getLinkDefaults File core/modules/book/src/BookManager.php, line 119 Class BookManager Defines a book manager. Namespace Drupal\book Code public function getLinkDefaults($nid) { return array( 'original_bi