You are here

public function Migration::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::__construct()
  2. 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::__construct()

Constructs a Migration.

Parameters

array $configuration: Plugin configuration.

string $plugin_id: The plugin ID.

mixed $plugin_definition: The plugin definition.

\Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager: The migration plugin manager.

\Drupal\migrate\Plugin\MigratePluginManagerInterface $source_plugin_manager: The source migration plugin manager.

\Drupal\migrate\Plugin\MigratePluginManagerInterface $process_plugin_manager: The process migration plugin manager.

\Drupal\migrate\Plugin\MigrateDestinationPluginManager $destination_plugin_manager: The destination migration plugin manager.

\Drupal\migrate\Plugin\MigratePluginManagerInterface $id_map_plugin_manager: The ID map migration plugin manager.

Overrides PluginBase::__construct

File

core/modules/migrate/src/Plugin/Migration.php, line 350

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationPluginManagerInterface $migration_plugin_manager, MigratePluginManagerInterface $source_plugin_manager, MigratePluginManagerInterface $process_plugin_manager, MigrateDestinationPluginManager $destination_plugin_manager, MigratePluginManagerInterface $id_map_plugin_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->migrationPluginManager = $migration_plugin_manager;
  $this->sourcePluginManager = $source_plugin_manager;
  $this->processPluginManager = $process_plugin_manager;
  $this->destinationPluginManager = $destination_plugin_manager;
  $this->idMapPluginManager = $id_map_plugin_manager;
  foreach (NestedArray::mergeDeepArray([
    $plugin_definition,
    $configuration,
  ], TRUE) as $key => $value) {
    $this->{$key} = $value;
  }
}