function BookManager::getAllBooks

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

Returns an array of all books.

This list may be used for generating a list of all the books, or for building the options for a form select.

Return value

array An array of all books.

Overrides BookManagerInterface::getAllBooks

1 call to BookManager::getAllBooks()
BookManager::addFormElements in core/modules/book/src/BookManager.php
Builds the common elements of the book form for the node and outline forms.

File

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

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function getAllBooks() {
    if (!isset($this->books)) {
        $this->loadBooks();
    }
    return $this->books;
}

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