public function Path::__construct

Constructs a Path CRUD object.

@todo This class should not take an alias manager in its constructor. Once we move to firing an event for CRUD operations instead of invoking a hook, we can have a listener that calls cacheClear() on the alias manager.

Parameters

\Drupal\Core\Database\Connection $connection: A database connection for reading and writing path aliases.

\Drupal\Core\Path\AliasManager $alias_manager: An alias manager with an internal cache of stored aliases.

File

drupal/core/lib/Drupal/Core/Path/Path.php, line 38
Contains Drupal\Core\Path\Path.

Class

Path
Defines a class for CRUD operations on path aliases.

Namespace

Drupal\Core\Path

Code

public function __construct(Connection $connection, AliasManager $alias_manager) {
  $this->connection = $connection;
  $this->alias_manager = $alias_manager;
}