function MenuTreeStorageInterface::loadAllChildren

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php \Drupal\Core\Menu\MenuTreeStorageInterface::loadAllChildren()
  2. 10 core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php \Drupal\Core\Menu\MenuTreeStorageInterface::loadAllChildren()
  3. 11.x core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php \Drupal\Core\Menu\MenuTreeStorageInterface::loadAllChildren()

Loads all the enabled menu links that are below the given ID.

The returned links are not ordered, and visible children will be included even if they have parent that is not enabled or ancestor so would not normally appear in a rendered tree.

Parameters

string $id: The parent menu link ID.

int $max_relative_depth: The maximum relative depth of the children relative to the passed parent.

Return value

array An array of enabled link definitions, keyed by ID.

1 method overrides MenuTreeStorageInterface::loadAllChildren()
MenuTreeStorage::loadAllChildren in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads all the enabled menu links that are below the given ID.

File

core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php, line 160

Class

MenuTreeStorageInterface
Defines an interface for storing a menu tree containing menu link IDs.

Namespace

Drupal\Core\Menu

Code

public function loadAllChildren($id, $max_relative_depth = NULL);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.