public function StaticMenuLinkOverrides::loadOverride in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php \Drupal\Core\Menu\StaticMenuLinkOverrides::loadOverride()
Loads any overrides to the definition of a static (YAML-defined) link.
Parameters
string $id: A menu link plugin ID.
Return value
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.
Overrides StaticMenuLinkOverridesInterface::loadOverride
1 call to StaticMenuLinkOverrides::loadOverride()
- StaticMenuLinkOverrides::saveOverride in core/
lib/ Drupal/ Core/ Menu/ StaticMenuLinkOverrides.php - Saves the override.
File
- core/
lib/ Drupal/ Core/ Menu/ StaticMenuLinkOverrides.php, line 78 - Contains \Drupal\Core\Menu\StaticMenuLinkOverrides.
Class
- StaticMenuLinkOverrides
- Defines an implementation of the menu link override using a config file.
Namespace
Drupal\Core\MenuCode
public function loadOverride($id) {
$all_overrides = $this
->getConfig()
->get('definitions');
$id = static::encodeId($id);
return $id && isset($all_overrides[$id]) ? $all_overrides[$id] : array();
}