BookManager::getParentDepthLimit

public BookManager::getParentDepthLimit(array $book_link)

Finds the depth limit for items in the parent select.

Parameters

array $book_link: A fully loaded menu link that is part of the book hierarchy.

Return value

int The depth limit for items in the parent select.

Overrides BookManagerInterface::getParentDepthLimit

File

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

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

Please login to continue.