You are here

public function Migrator::__construct in Lightning Workflow 8.2

Same name and namespace in other branches
  1. 8.3 modules/lightning_scheduler/src/Migrator.php \Drupal\lightning_scheduler\Migrator::__construct()

Migrator constructor.

Parameters

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

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

\Drupal\Core\State\StateInterface $state: The state service.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

\Drupal\Core\StringTranslation\TranslationInterface $translation: (optional) The string translation service.

File

modules/lightning_scheduler/src/Migrator.php, line 68

Class

Migrator
This class is final because the migration is not an API and should not be extended or re-used.

Namespace

Drupal\lightning_scheduler

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, Connection $database, StateInterface $state, MessengerInterface $messenger, TranslationInterface $translation = NULL) {
  $this->entityTypeManager = $entity_type_manager;
  $this->database = $database;
  $this->state = $state;
  $this->messenger = $messenger;
  if ($translation) {
    $this
      ->setStringTranslation($translation);
  }
}