You are here

public function MigrationState::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/MigrationState.php \Drupal\migrate_drupal\MigrationState::__construct()

Construct a new MigrationState object.

Parameters

\Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface $fieldPluginManager: Field plugin manager.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: Module handler.

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

\Drupal\Core\StringTranslation\TranslationInterface $stringTranslation: String translation service.

File

core/modules/migrate_drupal/src/MigrationState.php, line 220

Class

MigrationState
Determines the migrate state for all modules enabled on the source.

Namespace

Drupal\migrate_drupal

Code

public function __construct(MigrateFieldPluginManagerInterface $fieldPluginManager, ModuleHandlerInterface $moduleHandler, MessengerInterface $messenger, TranslationInterface $stringTranslation) {
  $this->fieldPluginManager = $fieldPluginManager;
  $this->moduleHandler = $moduleHandler;
  $this->enabledModules = array_keys($this->moduleHandler
    ->getModuleList());
  $this->enabledModules[] = 'core';
  $this->messenger = $messenger;
  $this->stringTranslation = $stringTranslation;
}