function BookManager::getTableOfContents

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

Overrides BookManagerInterface::getTableOfContents

1 call to BookManager::getTableOfContents()
BookManager::addParentSelectFormElements in core/modules/book/src/BookManager.php
Builds the parent selection form element for the node form or outline tab.

File

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

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function getTableOfContents($bid, $depth_limit, array $exclude = []) {
    $tree = $this->bookTreeAllData($bid);
    $toc = [];
    $this->recurseTableOfContents($tree, '', $toc, $exclude, $depth_limit);
    return $toc;
}

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