BookManager::findChildrenRelativeDepth

protected BookManager::findChildrenRelativeDepth(array $book_link)

Determine the relative depth of the children of a given book link.

Parameters

array $book_link: The book link.

Return value

int The difference between the max depth in the book tree and the depth of the passed book link.

File

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

Class

BookManager
Defines a book manager.

Namespace

Drupal\book

Code

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;
}
doc_Drupal
2016-10-29 08:48:10
Comments
Leave a Comment

Please login to continue.