function MenuTreeStorage::getSubtreeHeight
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::getSubtreeHeight()
- 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::getSubtreeHeight()
- 11.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::getSubtreeHeight()
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuTreeStorage.php, line 418
Class
- MenuTreeStorage
- Provides a menu tree storage using the database.
Namespace
Drupal\Core\MenuCode
public function getSubtreeHeight($id) {
$original = $this->loadFull($id);
return $original ? $this->doFindChildrenRelativeDepth($original) + 1 : 0;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.