function PathAliasSubscriber::__construct

Same name in other branches
  1. 9 core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php \Drupal\path_alias\EventSubscriber\PathAliasSubscriber::__construct()
  2. 10 core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php \Drupal\path_alias\EventSubscriber\PathAliasSubscriber::__construct()

Constructs a new PathSubscriber instance.

Parameters

\Drupal\path_alias\AliasManagerInterface $alias_manager: The alias manager.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

File

core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php, line 39

Class

PathAliasSubscriber
Provides a path subscriber that converts path aliases.

Namespace

Drupal\path_alias\EventSubscriber

Code

public function __construct(AliasManagerInterface $alias_manager, CurrentPathStack $current_path) {
    $this->aliasManager = $alias_manager;
    $this->currentPath = $current_path;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.