function BookManager::getTableOfContents

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

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.