function BookManager::getParentDepthLimit

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

Overrides BookManagerInterface::getParentDepthLimit

File

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

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

public function getParentDepthLimit(array $book_link) {
    return static::BOOK_MAX_DEPTH - 1 - ($book_link['bid'] && $book_link['has_children'] ? $this->findChildrenRelativeDepth($book_link) : 0);
}

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