MenuLinkTree::getSubtreeHeight

public MenuLinkTree::getSubtreeHeight($id)

Finds the height of a subtree rooted by of the given ID.

Parameters

string $id: The ID of an item in the storage.

Return value

int Returns the height of the subtree. This will be at least 1 if the ID exists, or 0 if the ID does not exist in the storage.

Overrides MenuLinkTreeInterface::getSubtreeHeight

File

core/lib/Drupal/Core/Menu/MenuLinkTree.php, line 287

Class

MenuLinkTree
Implements the loading, transforming and rendering of menu link trees.

Namespace

Drupal\Core\Menu

Code

public function getSubtreeHeight($id) {
  return $this->treeStorage->getSubtreeHeight($id);
}
doc_Drupal
2016-10-29 09:27:18
Comments
Leave a Comment

Please login to continue.