public function MigrationLookup::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php \Drupal\migrate\Plugin\migrate\process\MigrationLookup::__construct()
Constructs a \Drupal\Component\Plugin\PluginBase 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.
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;
}