W3cubDocs

/Drupal 8

public function MenuLinkManagerInterface::getParentIds

public MenuLinkManagerInterface::getParentIds($id)

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.

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\Menu

Code

public function getParentIds($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!MenuLinkManagerInterface.php/function/MenuLinkManagerInterface::getParentIds/8.1.x