ContextActiveTrailServiceProvider.php in Context Active Trail 8
Same filename and directory in other branches
Namespace
Drupal\context_active_trailFile
src/ContextActiveTrailServiceProvider.phpView 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
Name | Description |
---|---|
ContextActiveTrailServiceProvider | Overrides the class for the menu link tree. |