function MigrationLookup::__construct
Constructs a MigrationLookup object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\migrate\Plugin\MigrationInterface $migration: The Migration the plugin is being used in.
\Drupal\migrate\MigrateLookupInterface $migrate_lookup: The migrate lookup service.
\Drupal\migrate\MigrateStubInterface $migrate_stub: The migrate stub service.
Overrides PluginBase::__construct
File
- 
              core/modules/ migrate/ src/ Plugin/ migrate/ process/ MigrationLookup.php, line 149 
Class
- MigrationLookup
- Looks up the value of a property based on a previous migration.
Namespace
Drupal\migrate\Plugin\migrate\processCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, $migrate_lookup, $migrate_stub = NULL) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if (!$migrate_lookup instanceof MigrateLookupInterface) {
    @trigger_error('Not passing the migrate lookup service as the fifth parameter to ' . __METHOD__ . ' is deprecated in drupal:8.8.0 and will throw a type error in drupal:9.0.0. Pass an instance of \\Drupal\\migrate\\MigrateLookupInterface. See https://www.drupal.org/node/3047268', E_USER_DEPRECATED);
    $migrate_lookup = \Drupal::service('migrate.lookup');
  }
  if (!$migrate_stub instanceof MigrateStubInterface) {
    @trigger_error('Not passing the migrate stub service as the sixth parameter to ' . __METHOD__ . ' is deprecated in drupal:8.8.0 and will throw a type error in drupal:9.0.0. Pass an instance of \\Drupal\\migrate\\MigrateStubInterface. See https://www.drupal.org/node/3047268', E_USER_DEPRECATED);
    $migrate_stub = \Drupal::service('migrate.stub');
  }
  $this->migration = $migration;
  $this->migrateLookup = $migrate_lookup;
  $this->migrateStub = $migrate_stub;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
