You are here

public function LanguageNeutralAliasesStorage::__construct in Language neutral aliases 8

Constructs a Path CRUD object.

Parameters

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Overrides AliasStorage::__construct

File

src/LanguageNeutralAliasesStorage.php, line 26

Class

LanguageNeutralAliasesStorage
Language neutral alias storage.

Namespace

Drupal\language_neutral_aliases

Code

public function __construct(Connection $connection, ModuleHandlerInterface $module_handler) {
  parent::__construct($connection, $module_handler);
  $this->field = 'path';

  // Before 8.8 the field was named source.
  if (version_compare(Drupal::VERSION, '8.8', '<')) {
    $this->field = 'source';
  }
}