public function StaticMenuLinkOverrides::loadOverride in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php \Drupal\Core\Menu\StaticMenuLinkOverrides::loadOverride()
- 9 core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php \Drupal\Core\Menu\StaticMenuLinkOverrides::loadOverride()
File
- core/
lib/ Drupal/ Core/ Menu/ StaticMenuLinkOverrides.php, line 73
Class
- StaticMenuLinkOverrides
- Defines an implementation of the menu link override using a config file.
Namespace
Drupal\Core\MenuCode
public function loadOverride($id) {
assert(is_string($id), 'Menu link plugin ID should be a string.');
$all_overrides = $this
->getConfig()
->get('definitions');
$id = static::encodeId($id);
return $all_overrides[$id] ?? [];
}