protected function BookManager::findChildrenRelativeDepth in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/book/src/BookManager.php \Drupal\book\BookManager::findChildrenRelativeDepth()
Determine the relative depth of the children of a given book link.
Parameters
array: The book link.
Return value
int The difference between the max depth in the book tree and the depth of the passed book link.
1 call to BookManager::findChildrenRelativeDepth()
- BookManager::getParentDepthLimit in core/
modules/ book/ src/ BookManager.php - Finds the depth limit for items in the parent select.
File
- core/
modules/ book/ src/ BookManager.php, line 153 - Contains \Drupal\book\BookManager.
Class
- BookManager
- Defines a book manager.
Namespace
Drupal\bookCode
protected function findChildrenRelativeDepth(array $book_link) {
$max_depth = $this->bookOutlineStorage
->getChildRelativeDepth($book_link, static::BOOK_MAX_DEPTH);
return $max_depth > $book_link['depth'] ? $max_depth - $book_link['depth'] : 0;
}