function StaticMenuLinkOverrides::loadMultipleOverrides
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php \Drupal\Core\Menu\StaticMenuLinkOverrides::loadMultipleOverrides()
- 10 core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php \Drupal\Core\Menu\StaticMenuLinkOverrides::loadMultipleOverrides()
- 11.x core/lib/Drupal/Core/Menu/StaticMenuLinkOverrides.php \Drupal\Core\Menu\StaticMenuLinkOverrides::loadMultipleOverrides()
Overrides StaticMenuLinkOverridesInterface::loadMultipleOverrides
File
-
core/
lib/ Drupal/ Core/ Menu/ StaticMenuLinkOverrides.php, line 108
Class
- StaticMenuLinkOverrides
- Defines an implementation of the menu link override using a config file.
Namespace
Drupal\Core\MenuCode
public function loadMultipleOverrides(array $ids) {
$result = [];
if ($ids) {
$all_overrides = $this->getConfig()
->get('definitions') ?: [];
foreach ($ids as $id) {
$encoded_id = static::encodeId($id);
if (isset($all_overrides[$encoded_id])) {
$result[$id] = $all_overrides[$encoded_id];
}
}
}
return $result;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.