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: Whether access checking should be taken into account.
Return value
array Array of loaded book items.
Overrides BookOutlineStorageInterface::loadMultiple
File
- core/modules/book/src/BookOutlineStorage.php, line 45
Class
- BookOutlineStorage
- Defines a storage class for books outline.
Namespace
Drupal\book
Code
1 2 3 4 5 6 7 8 9 10 11 12 | public function loadMultiple( $nids , $access = TRUE) { $query = $this ->connection->select( 'book' , 'b' , array ( 'fetch' => \PDO::FETCH_ASSOC)); $query ->fields( 'b' ); $query ->condition( 'b.nid' , $nids , 'IN' ); if ( $access ) { $query ->addTag( 'node_access' ); $query ->addMetaData( 'base_table' , 'book' ); } return $query ->execute(); } |
Please login to continue.