BookOutlineStorage::__construct

public BookOutlineStorage::__construct(Connection $connection) Constructs a BookOutlineStorage object. File core/modules/book/src/BookOutlineStorage.php, line 22 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public function __construct(Connection $connection) { $this->connection = $connection; }

BookOutlineStorage::updateMovedChildren

public BookOutlineStorage::updateMovedChildren($bid, $original, $expressions, $shift) Update the book ID of the book link that it's being moved. Parameters int $bid: The ID of the book whose children we move. array $original: The original parent of the book link. array $expressions: Array of expressions to be added to the query. int $shift: The difference in depth between the old and the new position of the element being moved. Return value mixed The number of rows matched by the update query

BookOutlineStorage::update

public BookOutlineStorage::update($nid, $fields) Updates book reference for links that were moved between books. Parameters int $nid: The nid of the book entry to be updated. array $fields: The array of fields to be updated. Return value mixed The number of rows matched by the update query. Overrides BookOutlineStorageInterface::update File core/modules/book/src/BookOutlineStorage.php, line 144 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book

BookOutlineStorage::loadMultiple

public BookOutlineStorage::loadMultiple($nids, $access = TRUE) Loads books. Each book entry consists of the following keys: bid: The node ID of the main book. nid: The node ID of the book entry itself. pid: The parent node ID of the book. has_children: A boolean to indicate whether the book has children. weight: The weight of the book entry to order siblings. depth: The depth in the menu hierarchy the entry is placed into. Parameters array $nids: An array of node IDs. bool $access: Whe

BookOutlineStorage::loadBookChildren

public BookOutlineStorage::loadBookChildren($pid) Loads book's children using it's parent ID. Parameters int $pid: The book's parent ID. Return value array Array of loaded book items. Overrides BookOutlineStorageInterface::loadBookChildren File core/modules/book/src/BookOutlineStorage.php, line 90 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public function loadBookChildren($pid) { return $this->connection ->query("SELECT

BookOutlineStorage::insert

public BookOutlineStorage::insert($link, $parents) Inserts a book link. Parameters array $link: The link array to be inserted in the database. array $parents: The array of parent ids for the link to be inserted. Return value mixed The last insert ID of the query, if one exists. Overrides BookOutlineStorageInterface::insert File core/modules/book/src/BookOutlineStorage.php, line 128 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public f

BookOutlineStorage::hasBooks

public BookOutlineStorage::hasBooks() Checks if there are any books. Return value bool TRUE if there are books, FALSE if not. Overrides BookOutlineStorageInterface::hasBooks File core/modules/book/src/BookOutlineStorage.php, line 36 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public function hasBooks() { return (bool) $this->connection ->query('SELECT count(bid) FROM {book}') ->fetchField(); }

BookOutlineStorage::getChildRelativeDepth

public BookOutlineStorage::getChildRelativeDepth($book_link, $max_depth) Gets child relative depth. Parameters array $book_link: The book link. int $max_depth: The maximum supported depth of the book tree. Return value int The depth of the searched book. Overrides BookOutlineStorageInterface::getChildRelativeDepth File core/modules/book/src/BookOutlineStorage.php, line 61 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public function ge

BookOutlineStorage::getBookSubtree

public BookOutlineStorage::getBookSubtree($link, $max_depth) Get book subtree. Parameters array $link: A fully loaded book link. int $max_depth: The maximum supported depth of the book tree. Return value array Array of unordered subtree book items. Overrides BookOutlineStorageInterface::getBookSubtree File core/modules/book/src/BookOutlineStorage.php, line 188 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public function getBookSubtree

BookOutlineStorage::getBooks

public BookOutlineStorage::getBooks() Gets books (the highest positioned book links). Return value array An array of book IDs. Overrides BookOutlineStorageInterface::getBooks File core/modules/book/src/BookOutlineStorage.php, line 29 Class BookOutlineStorage Defines a storage class for books outline. Namespace Drupal\book Code public function getBooks() { return $this->connection->query("SELECT DISTINCT(bid) FROM {book}")->fetchCol(); }