function NavigationServiceProvider::register
Same name in other branches
- 10 core/modules/navigation/src/NavigationServiceProvider.php \Drupal\navigation\NavigationServiceProvider::register()
Overrides ServiceProviderInterface::register
File
-
core/
modules/ navigation/ src/ NavigationServiceProvider.php, line 21
Class
- NavigationServiceProvider
- Defines a service provider for the Navigation module.
Namespace
Drupal\navigationCode
public function register(ContainerBuilder $container) : void {
// If shortcuts module service is available, register our own service.
if ($container->has('shortcut.lazy_builders')) {
$container->register('navigation.shortcut_lazy_builder', ShortcutLazyBuilder::class)
->addArgument(new Reference('shortcut.lazy_builders'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.