Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.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 objects which overrides menu links defined in YAML. | |
7 */ | |
8 interface StaticMenuLinkOverridesInterface { | |
9 | |
10 /** | |
11 * Reloads the overrides from config. | |
12 * | |
13 * Forces all overrides to be reloaded from config storage to compare the | |
14 * override value with the value submitted during test form submission. | |
15 */ | |
16 public function reload(); | |
17 | |
18 /** | |
19 * Loads any overrides to the definition of a static (YAML-defined) link. | |
20 * | |
21 * @param string $id | |
22 * A menu link plugin ID. | |
23 * | |
24 * @return array|null | |
25 * An override with following supported keys: | |
26 * - parent | |
27 * - weight | |
28 * - menu_name | |
29 * - expanded | |
30 * - enabled | |
31 * or NULL if there is no override for the given ID. | |
32 */ | |
33 public function loadOverride($id); | |
34 | |
35 /** | |
36 * Deletes any overrides to the definition of a static (YAML-defined) link. | |
37 * | |
38 * @param string $id | |
39 * A menu link plugin ID. | |
40 */ | |
41 public function deleteOverride($id); | |
42 | |
43 /** | |
44 * Deletes multiple overrides to definitions of static (YAML-defined) links. | |
45 * | |
46 * @param array $ids | |
47 * Array of menu link plugin IDs. | |
48 */ | |
49 public function deleteMultipleOverrides(array $ids); | |
50 | |
51 /** | |
52 * Loads overrides to multiple definitions of a static (YAML-defined) link. | |
53 * | |
54 * @param array $ids | |
55 * Array of menu link plugin IDs. | |
56 * | |
57 * @return array | |
58 * One or override keys by plugin ID. | |
59 * | |
60 * @see \Drupal\Core\Menu\StaticMenuLinkOverridesInterface | |
61 */ | |
62 public function loadMultipleOverrides(array $ids); | |
63 | |
64 /** | |
65 * Saves the override. | |
66 * | |
67 * @param string $id | |
68 * A menu link plugin ID. | |
69 * @param array $definition | |
70 * The definition values to override. Supported keys: | |
71 * - menu_name | |
72 * - parent | |
73 * - weight | |
74 * - expanded | |
75 * - enabled | |
76 * | |
77 * @return array | |
78 * A list of properties which got saved. | |
79 */ | |
80 public function saveOverride($id, array $definition); | |
81 | |
82 /** | |
83 * The unique cache tag associated with this menu link override. | |
84 * | |
85 * @return string[] | |
86 * An array of cache tags. | |
87 */ | |
88 public function getCacheTags(); | |
89 | |
90 } |