You are here

public function FilePlain::__construct in Media Migration 8

Constructs a plugin instance.

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 current migration.

\Drupal\Core\State\StateInterface $state: The state service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\media_migration\FileDealerManagerInterface $file_dealer_manager: The file entity dealer plugin manager.

Overrides DrupalSqlBase::__construct

File

src/Plugin/migrate/source/d7/FilePlain.php, line 62

Class

FilePlain
File Plain source plugin.

Namespace

Drupal\media_migration\Plugin\migrate\source\d7

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state, EntityTypeManagerInterface $entity_type_manager, FileDealerManagerInterface $file_dealer_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $state, $entity_type_manager);
  $this->sourceHasFileEntities = $this
    ->getDatabase()
    ->schema()
    ->fieldExists('file_managed', 'type');
  $this->fileDealerManager = $file_dealer_manager;
}