public function ContextActiveTrailServiceProvider::alter in Context Active Trail 8
Same name and namespace in other branches
- 8.2 src/ContextActiveTrailServiceProvider.php \Drupal\context_active_trail\ContextActiveTrailServiceProvider::alter()
Modifies existing service definitions.
Parameters
ContainerBuilder $container: The ContainerBuilder whose service definitions can be altered.
Overrides ServiceProviderBase::alter
File
- src/
ContextActiveTrailServiceProvider.php, line 17
Class
- ContextActiveTrailServiceProvider
- Overrides the class for the menu link tree.
Namespace
Drupal\context_active_trailCode
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('menu.active_trail');
$definition
->setClass('Drupal\\context_active_trail\\ContextActiveTrail');
$definition
->addArgument(new Reference('context.manager'));
}