Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MenuActiveTrailInterface.php

function 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.

2 methods override 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.
MenuActiveTrail::getActiveTrailIds in core/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php
Gets the active trail IDs of the specified menu tree.

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);
RSS feed
Powered by Drupal