You are here

class ContextActiveTrailServiceProvider in Context Active Trail 8

Same name and namespace in other branches
  1. 8.2 src/ContextActiveTrailServiceProvider.php \Drupal\context_active_trail\ContextActiveTrailServiceProvider

Overrides the class for the menu link tree.

Hierarchy

Expanded class hierarchy of ContextActiveTrailServiceProvider

File

src/ContextActiveTrailServiceProvider.php, line 12

Namespace

Drupal\context_active_trail
View source
class ContextActiveTrailServiceProvider extends ServiceProviderBase {

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {
    $definition = $container
      ->getDefinition('menu.active_trail');
    $definition
      ->setClass('Drupal\\context_active_trail\\ContextActiveTrail');
    $definition
      ->addArgument(new Reference('context.manager'));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContextActiveTrailServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceProviderBase::alter
ServiceProviderBase::register public function Registers services to the container. Overrides ServiceProviderInterface::register 1