You are here

public function MediaEntityGenerator::__construct in Migrate File Entities to Media Entities 8

MediaEntityGenerator constructor.

Parameters

array $configuration:

$plugin_id:

$plugin_definition:

\Drupal\migrate\Plugin\MigrationInterface $migration:

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager:

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager:

\Drupal\Core\Database\Connection $connection:

Throws

\Drupal\migrate\MigrateException

Overrides SourcePluginBase::__construct

File

src/Plugin/migrate/source/MediaEntityGenerator.php, line 63

Class

MediaEntityGenerator
Returns bare-bones information about every available file entity.

Namespace

Drupal\migrate_file_to_media\Plugin\migrate\source

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityFieldManagerInterface $entity_field_manager, EntityTypeManagerInterface $entity_type_manager, Connection $connection) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
  $this->entityFieldManager = $entity_field_manager;
  $this->entityTypeManager = $entity_type_manager;
  $this->connection = $connection;
  foreach ($this->configuration['field_names'] as $name) {
    $this->sourceFields[$name] = $name;
  }
}