You are here

class MenuTrailByPathServiceProvider in Menu Trail By Path 8

Overrides the class for the menu link tree.

Hierarchy

Expanded class hierarchy of MenuTrailByPathServiceProvider

File

src/MenuTrailByPathServiceProvider.php, line 12

Namespace

Drupal\menu_trail_by_path
View 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

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