You are here

public function AliasStorageHelper::__construct in Pathauto 8

The config factory.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\path_alias\AliasRepositoryInterface $alias_repository: The alias repository.

\Drupal\Core\Database\Connection $database: The database connection.

MessengerInterface $messenger: The messenger.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

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

File

src/AliasStorageHelper.php, line 79

Class

AliasStorageHelper
Provides helper methods for accessing alias storage.

Namespace

Drupal\pathauto

Code

public function __construct(ConfigFactoryInterface $config_factory, AliasRepositoryInterface $alias_repository, Connection $database, MessengerInterface $messenger, TranslationInterface $string_translation, EntityTypeManagerInterface $entity_type_manager = NULL) {
  $this->configFactory = $config_factory;
  $this->aliasRepository = $alias_repository;
  $this->database = $database;
  $this->messenger = $messenger;
  $this->stringTranslation = $string_translation;
  $this->entityTypeManager = $entity_type_manager ?: \Drupal::service('entity_type.manager');
}