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

1
2
3
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.