You are here

public function Migration::__construct in Drupal 8

Same name and namespace in other branches
  1. 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 $idmap_plugin_manager: The ID map migration plugin manager.

Overrides PluginBase::__construct

1 call to Migration::__construct()
FieldMigration::__construct in core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php
Constructs a FieldMigration.
3 methods override Migration::__construct()
FieldMigration::__construct in core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php
Constructs a FieldMigration.
TestMigration::__construct in core/modules/migrate/tests/src/Unit/MigrationTest.php
Constructs an instance of TestMigration object.
TestMigrationMock::__construct in core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
TestMigrationMock constructor.

File

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

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 $idmap_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 = $idmap_plugin_manager;
  foreach (NestedArray::mergeDeepArray([
    $plugin_definition,
    $configuration,
  ], TRUE) as $key => $value) {
    $this->{$key} = $value;
  }
}