public function MenuLinkManager::getChildIds in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::getChildIds()
 
Loads all child link IDs of a given menu link, regardless of visibility.
This method is mostly useful for testing.
Parameters
string $id: The menu link plugin ID.
Return value
array An unordered array of IDs representing the IDs of all children, or NULL if the ID is invalid.
Overrides MenuLinkManagerInterface::getChildIds
File
- core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php, line 324  
Class
- MenuLinkManager
 - Manages discovery, instantiation, and tree building of menu link plugins.
 
Namespace
Drupal\Core\MenuCode
public function getChildIds($id) {
  if ($this
    ->getDefinition($id, FALSE)) {
    return $this->treeStorage
      ->getAllChildIds($id);
  }
  return NULL;
}