You are here

public function MenuActiveTrailInterface::getActiveTrailIds in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php \Drupal\Core\Menu\MenuActiveTrailInterface::getActiveTrailIds()
  2. 9 core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php \Drupal\Core\Menu\MenuActiveTrailInterface::getActiveTrailIds()

Gets the active trail IDs of the specified menu tree.

Parameters

string|null $menu_name: (optional) The menu name of the requested tree. If omitted, all menu trees will be searched.

Return value

array An array containing the active trail: a list of plugin IDs.

1 method overrides MenuActiveTrailInterface::getActiveTrailIds()
MenuActiveTrail::getActiveTrailIds in core/lib/Drupal/Core/Menu/MenuActiveTrail.php
This implementation caches all active trail IDs per route match for *all* menus whose active trails are calculated on that page. This ensures 1 cache get for all active trails per page load, rather than N.

File

core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php, line 23

Class

MenuActiveTrailInterface
Defines an interface for the active menu trail service.

Namespace

Drupal\Core\Menu

Code

public function getActiveTrailIds($menu_name);