You are here

ContextActiveTrailServiceProvider.php in Context Active Trail 8

Same filename and directory in other branches
  1. 8.2 src/ContextActiveTrailServiceProvider.php

File

src/ContextActiveTrailServiceProvider.php
View source
<?php

namespace Drupal\context_active_trail;

use Drupal\Core\DependencyInjection\ServiceProviderBase;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
 * Overrides the class for the menu link tree.
 */
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'));
  }

}

Classes

Namesort descending Description
ContextActiveTrailServiceProvider Overrides the class for the menu link tree.