W3cubDocs

/Drupal 8

public function MenuLinkTreeInterface::getSubtreeHeight

public MenuLinkTreeInterface::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.

File

core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php, line 114

Class

MenuLinkTreeInterface
Defines an interface for loading, transforming and rendering menu link trees.

Namespace

Drupal\Core\Menu

Code

public function getSubtreeHeight($id);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuLinkTreeInterface.php/function/MenuLinkTreeInterface::getSubtreeHeight/8.1.x