class ShortcutServiceProvider

Same name and namespace in other branches
  1. 11.x core/modules/shortcut/src/ShortcutServiceProvider.php \Drupal\shortcut\ShortcutServiceProvider

Defines a service provider for the Shortcut module.

@internal

Hierarchy

Expanded class hierarchy of ShortcutServiceProvider

File

core/modules/shortcut/src/ShortcutServiceProvider.php, line 16

Namespace

Drupal\shortcut
View source
final class ShortcutServiceProvider implements ServiceProviderInterface {
  
  /**
   * {@inheritdoc}
   */
  public function register(ContainerBuilder $container) : void {
    // Register the navigation lazy builder if navigation module is enabled.
    if ($container->has('navigation.renderer')) {
      $container->register('navigation.shortcut_lazy_builder', ShortcutNavigationLazyBuilder::class)
        ->addArgument(new Reference('shortcut.lazy_builders'));
    }
  }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ShortcutServiceProvider::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.