You are here

public function FieldFile::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php \Drupal\file\Plugin\migrate\process\d6\FieldFile::__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/file/src/Plugin/migrate/process/d6/FieldFile.php, line 55

Class

FieldFile
Plugin annotation @MigrateProcessPlugin( id = "d6_field_file" )

Namespace

Drupal\file\Plugin\migrate\process\d6

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, $migrate_lookup) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if ($migrate_lookup instanceof MigrateProcessInterface) {
    @trigger_error('Passing a migration process plugin as the fourth argument to ' . __METHOD__ . ' is deprecated in drupal:8.8.0 and will throw an error in drupal:9.0.0. Pass the migrate.lookup service instead. See https://www.drupal.org/node/3047268', E_USER_DEPRECATED);
    $this->migrationPlugin = $migrate_lookup;
    $migrate_lookup = \Drupal::service('migrate.lookup');
  }
  elseif (!$migrate_lookup instanceof MigrateLookupInterface) {
    throw new \InvalidArgumentException("The fifth argument to " . __METHOD__ . " must be an instance of MigrateLookupInterface.");
  }
  $this->migration = $migration;
  $this->migrateLookup = $migrate_lookup;
}