diff --git a/core/modules/book/src/BookManagerInterface.php b/core/modules/book/src/BookManagerInterface.php index 72ca61e..f3e4a89 100644 --- a/core/modules/book/src/BookManagerInterface.php +++ b/core/modules/book/src/BookManagerInterface.php @@ -57,6 +57,14 @@ public function getActiveTrailIds($bid, $link); /** * 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. + * + * On top of it, loadBookLinks + * * @param int $nid * The node ID of the book. * @param bool $translate @@ -70,6 +78,12 @@ public function loadBookLink($nid, $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. + * * @param int[] $nids * An array of nids to load. * diff --git a/core/modules/book/src/BookOutlineStorageInterface.php b/core/modules/book/src/BookOutlineStorageInterface.php index e9b0e0e..9c94412 100644 --- a/core/modules/book/src/BookOutlineStorageInterface.php +++ b/core/modules/book/src/BookOutlineStorageInterface.php @@ -31,6 +31,14 @@ public function hasBooks(); /** * 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. + * * @param array $nids * An array of node IDs. * @param bool $access