function PathProcessorAlias::__construct

Constructs a PathProcessorAlias object.

Parameters

\Drupal\Core\Path\AliasManagerInterface $alias_manager: An alias manager for looking up the system path.

File

core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php, line 32

Class

PathProcessorAlias
Processes the inbound path using path alias lookups.

Namespace

Drupal\Core\PathProcessor

Code

public function __construct(AliasManagerInterface $alias_manager) {
    $this->aliasManager = $alias_manager;
    // This is used as base class by the new class, so we do not trigger
    // deprecation notices when that or any child class is instantiated.
    $new_class = 'Drupal\\path_alias\\PathProcessor\\AliasPathProcessor';
    if (!is_a($this, $new_class) && class_exists($new_class)) {
        @trigger_error('The \\' . __CLASS__ . ' class is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, use \\' . $new_class . '. See https://drupal.org/node/3092086', E_USER_DEPRECATED);
    }
}

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