function MenuLinkManagerInterface::getParentIds
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php \Drupal\Core\Menu\MenuLinkManagerInterface::getParentIds()
- 8.9.x core/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php \Drupal\Core\Menu\MenuLinkManagerInterface::getParentIds()
- 10 core/lib/Drupal/Core/Menu/MenuLinkManagerInterface.php \Drupal\Core\Menu\MenuLinkManagerInterface::getParentIds()
Loads all parent link IDs of a given menu link.
This method is very similar to getActiveTrailIds() but allows the link to be specified rather than being discovered based on the menu name and request. This method is mostly useful for testing.
Parameters
string $id: The menu link plugin ID.
Return value
array An ordered array of IDs representing the path to the root of the tree. The first element of the array will be equal to $id, unless $id is not valid, in which case the return value will be NULL.
1 method overrides MenuLinkManagerInterface::getParentIds()
- MenuLinkManager::getParentIds in core/
lib/ Drupal/ Core/ Menu/ MenuLinkManager.php - Loads all parent link IDs of a given menu link.
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkManagerInterface.php, line 163
Class
- MenuLinkManagerInterface
- Defines an interface for managing menu links and storing their definitions.
Namespace
Drupal\Core\MenuCode
public function getParentIds($id);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.