public function MigrationState::__construct in Drupal 8
Same name and namespace in other branches
- 9 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 sevice.
\Drupal\Core\StringTranslation\TranslationInterface $stringTranslation: String translation service.
File
- core/
modules/ migrate_drupal/ src/ MigrationState.php, line 235
Class
- MigrationState
- Determines the migrate state for all modules enabled on the source.
Namespace
Drupal\migrate_drupalCode
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;
}