You are here

public function MediaEntityGeneratorD7::__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 Node::__construct

File

src/Plugin/migrate/source/MediaEntityGeneratorD7.php, line 69

Class

MediaEntityGeneratorD7
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, StateInterface $state, ModuleHandlerInterface $module_handler) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $state, $entity_type_manager, $module_handler);
  $this->entityFieldManager = $entity_field_manager;
  $this->entityTypeManager = $entity_type_manager;
  $this->connection = $connection;

  // Do not joint source tables.
  $this->configuration['ignore_map'] = TRUE;
  foreach ($this->configuration['field_names'] as $name) {
    $this->sourceFields[$name] = $name;
  }
}