class MenuTrailByPathServiceProvider in Menu Trail By Path 8
Overrides the class for the menu link tree.
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements ServiceModifierInterface, ServiceProviderInterface
- class \Drupal\menu_trail_by_path\MenuTrailByPathServiceProvider
Expanded class hierarchy of MenuTrailByPathServiceProvider
File
- src/
MenuTrailByPathServiceProvider.php, line 12
Namespace
Drupal\menu_trail_by_pathView source
class MenuTrailByPathServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = $container
->getDefinition('menu.active_trail');
$definition
->setClass('Drupal\\menu_trail_by_path\\MenuTrailByPathActiveTrail');
$definition
->addArgument(new Reference('menu_trail_by_path.path_helper'));
$definition
->addArgument(new Reference('menu_trail_by_path.menu_helper'));
$definition
->addArgument(new Reference('router.request_context'));
$definition
->addArgument(new Reference('language_manager'));
$definition
->addArgument(new Reference('config.factory'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MenuTrailByPathServiceProvider:: |
public | function |
Modifies existing service definitions. Overrides ServiceProviderBase:: |
|
ServiceProviderBase:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |
1 |