3 namespace Drupal\Core\Menu;
6 * Defines an interface for objects which overrides menu links defined in YAML.
8 interface StaticMenuLinkOverridesInterface {
11 * Reloads the overrides from config.
13 * Forces all overrides to be reloaded from config storage to compare the
14 * override value with the value submitted during test form submission.
16 public function reload();
19 * Loads any overrides to the definition of a static (YAML-defined) link.
22 * A menu link plugin ID.
25 * An override with following supported keys:
31 * or NULL if there is no override for the given ID.
33 public function loadOverride($id);
36 * Deletes any overrides to the definition of a static (YAML-defined) link.
39 * A menu link plugin ID.
41 public function deleteOverride($id);
44 * Deletes multiple overrides to definitions of static (YAML-defined) links.
47 * Array of menu link plugin IDs.
49 public function deleteMultipleOverrides(array $ids);
52 * Loads overrides to multiple definitions of a static (YAML-defined) link.
55 * Array of menu link plugin IDs.
58 * One or override keys by plugin ID.
60 * @see \Drupal\Core\Menu\StaticMenuLinkOverridesInterface
62 public function loadMultipleOverrides(array $ids);
68 * A menu link plugin ID.
69 * @param array $definition
70 * The definition values to override. Supported keys:
78 * A list of properties which got saved.
80 public function saveOverride($id, array $definition);
83 * The unique cache tag associated with this menu link override.
86 * An array of cache tags.
88 public function getCacheTags();