interface StaticMenuLinkOverridesInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Menu/StaticMenuLinkOverridesInterface.php \Drupal\Core\Menu\StaticMenuLinkOverridesInterface
Defines an interface for objects which overrides menu links defined in YAML.
Hierarchy
- interface \Drupal\Core\Menu\StaticMenuLinkOverridesInterface
Expanded class hierarchy of StaticMenuLinkOverridesInterface
All classes that implement StaticMenuLinkOverridesInterface
2 files declare their use of StaticMenuLinkOverridesInterface
- LoginLogoutMenuLink.php in core/
modules/ user/ src/ Plugin/ Menu/ LoginLogoutMenuLink.php - Contains \Drupal\user\Plugin\Menu\LoginLogoutMenuLink.
- MenuLinkDefaultTest.php in core/
tests/ Drupal/ Tests/ Core/ Menu/ MenuLinkDefaultTest.php - Contains \Drupal\Tests\Core\Menu\MenuLinkDefaultTest.
File
- core/
lib/ Drupal/ Core/ Menu/ StaticMenuLinkOverridesInterface.php, line 13 - Contains \Drupal\Core\Menu\StaticMenuLinkOverridesInterface.
Namespace
Drupal\Core\MenuView source
interface StaticMenuLinkOverridesInterface {
/**
* Reloads the overrides from config.
*
* Forces all overrides to be reloaded from config storage to compare the
* override value with the value submitted during test form submission.
*/
public function reload();
/**
* Loads any overrides to the definition of a static (YAML-defined) link.
*
* @param string $id
* A menu link plugin ID.
*
* @return array|NULL
* An override with following supported keys:
* - parent
* - weight
* - menu_name
* - expanded
* - enabled
* or NULL if there is no override for the given ID.
*/
public function loadOverride($id);
/**
* Deletes any overrides to the definition of a static (YAML-defined) link.
*
* @param string $id
* A menu link plugin ID.
*/
public function deleteOverride($id);
/**
* Deletes multiple overrides to definitions of static (YAML-defined) links.
*
* @param array $ids
* Array of menu link plugin IDs.
*/
public function deleteMultipleOverrides(array $ids);
/**
* Loads overrides to multiple definitions of a static (YAML-defined) link.
*
* @param array $ids
* Array of menu link plugin IDs.
*
* @return array
* One or override keys by plugin ID.
*
* @see \Drupal\Core\Menu\StaticMenuLinkOverridesInterface
*/
public function loadMultipleOverrides(array $ids);
/**
* Saves the override.
*
* @param string $id
* A menu link plugin ID.
* @param array $definition
* The definition values to override. Supported keys:
* - menu_name
* - parent
* - weight
* - expanded
* - enabled
*
* @return array
* A list of properties which got saved.
*/
public function saveOverride($id, array $definition);
/**
* The unique cache tag associated with this menu link override.
*
* @return string[]
* An array of cache tags.
*/
public function getCacheTags();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StaticMenuLinkOverridesInterface:: |
public | function | Deletes multiple overrides to definitions of static (YAML-defined) links. | 1 |
StaticMenuLinkOverridesInterface:: |
public | function | Deletes any overrides to the definition of a static (YAML-defined) link. | 1 |
StaticMenuLinkOverridesInterface:: |
public | function | The unique cache tag associated with this menu link override. | 1 |
StaticMenuLinkOverridesInterface:: |
public | function | Loads overrides to multiple definitions of a static (YAML-defined) link. | 1 |
StaticMenuLinkOverridesInterface:: |
public | function | Loads any overrides to the definition of a static (YAML-defined) link. | 1 |
StaticMenuLinkOverridesInterface:: |
public | function | Reloads the overrides from config. | 1 |
StaticMenuLinkOverridesInterface:: |
public | function | Saves the override. | 1 |