comparison core/lib/Drupal/Core/Menu/MenuActiveTrailInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Core\Menu;
4
5 /**
6 * Defines an interface for the active menu trail service.
7 *
8 * The active trail of a given menu is the trail from the current page to the
9 * root of that menu's tree.
10 */
11 interface MenuActiveTrailInterface {
12
13 /**
14 * Gets the active trail IDs of the specified menu tree.
15 *
16 * @param string|null $menu_name
17 * (optional) The menu name of the requested tree. If omitted, all menu
18 * trees will be searched.
19 *
20 * @return array
21 * An array containing the active trail: a list of plugin IDs.
22 */
23 public function getActiveTrailIds($menu_name);
24
25 /**
26 * Fetches a menu link which matches the route name, parameters and menu name.
27 *
28 * @param string|null $menu_name
29 * (optional) The menu within which to find the active link. If omitted, all
30 * menus will be searched.
31 *
32 * @return \Drupal\Core\Menu\MenuLinkInterface|null
33 * The menu link for the given route name, parameters and menu, or NULL if
34 * there is no matching menu link or the current user cannot access the
35 * current page (i.e. we have a 403 response).
36 */
37 public function getActiveLink($menu_name = NULL);
38
39 }