NavigationServiceProvider.php
Same filename in other branches
Namespace
Drupal\navigationFile
-
core/
modules/ navigation/ src/ NavigationServiceProvider.php
View source
<?php
declare (strict_types=1);
namespace Drupal\navigation;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderInterface;
use Symfony\Component\DependencyInjection\Reference;
/**
* Defines a service provider for the Navigation module.
*
* @internal
*/
final class NavigationServiceProvider implements ServiceProviderInterface {
/**
* {@inheritdoc}
*/
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'));
}
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
NavigationServiceProvider | Defines a service provider for the Navigation module. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.