function BookManager::loadBookLinks

Same name in other branches
  1. 8.9.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::loadBookLinks()
  2. 10 core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::loadBookLinks()
  3. 10 core/modules/book/src/BookManager.php \Drupal\book\BookManager::loadBookLinks()
  4. 11.x core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::loadBookLinks()
  5. 11.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::loadBookLinks()

Overrides BookManagerInterface::loadBookLinks

1 call to BookManager::loadBookLinks()
BookManager::loadBookLink in core/modules/book/src/BookManager.php
Loads a single book entry.

File

core/modules/book/src/BookManager.php, line 830

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function loadBookLinks($nids, $translate = TRUE) {
    $result = $this->bookOutlineStorage
        ->loadMultiple($nids, $translate);
    $links = [];
    foreach ($result as $link) {
        if ($translate) {
            $this->bookLinkTranslate($link);
        }
        $links[$link['nid']] = $link;
    }
    return $links;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.