You are here

public function SourcePluginBase::__construct in Multiversion 8

Constructor.

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.

MigrationInterface $migration: The migration.

EntityManagerInterface $entity_manager: The entity manager.

Overrides SourcePluginBase::__construct

1 call to SourcePluginBase::__construct()
TempStore::__construct in src/Plugin/migrate/source/TempStore.php
Constructor.
1 method overrides SourcePluginBase::__construct()
TempStore::__construct in src/Plugin/migrate/source/TempStore.php
Constructor.

File

src/Plugin/migrate/source/SourcePluginBase.php, line 60

Class

SourcePluginBase

Namespace

Drupal\multiversion\Plugin\migrate\source

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityManagerInterface $entity_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $migration);
  $this->entityManager = $entity_manager;
  list($entity_type_id) = explode('__', $migration
    ->id());
  $entity_type = $entity_manager
    ->getDefinition($entity_type_id);
  $this->entityTypeId = $entity_type_id;
  $this->entityIdKey = $entity_type
    ->getKey('id');
  $this->entityLanguageKey = $entity_type
    ->getKey('langcode');
}