class NavigationServiceProvider

Same name in other branches
  1. 11.x core/modules/navigation/src/NavigationServiceProvider.php \Drupal\navigation\NavigationServiceProvider

Defines a service provider for the Navigation module.

@internal

Hierarchy

Expanded class hierarchy of NavigationServiceProvider

File

core/modules/navigation/src/NavigationServiceProvider.php, line 16

Namespace

Drupal\navigation
View source
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'));
        }
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
NavigationServiceProvider::register public function Registers services to the container. Overrides ServiceProviderInterface::register

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.