function BookManager::getTableOfContents

Same name in this branch
  1. 10 core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::getTableOfContents()
Same name in other branches
  1. 9 core/modules/book/src/BookManager.php \Drupal\book\BookManager::getTableOfContents()
  2. 8.9.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::getTableOfContents()
  3. 11.x core/modules/book/src/ProxyClass/BookManager.php \Drupal\book\ProxyClass\BookManager::getTableOfContents()
  4. 11.x core/modules/book/src/BookManager.php \Drupal\book\BookManager::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 495

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.