You are here

public function AliasRepository::__construct in Drupal 8

Constructs an AliasRepository object.

Parameters

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

File

core/lib/Drupal/Core/Path/AliasRepository.php, line 33

Class

AliasRepository
Provides the default path alias lookup operations.

Namespace

Drupal\Core\Path

Code

public function __construct(Connection $connection) {
  $this->connection = $connection;

  // 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\\AliasRepository';
  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);
  }
}