You are here

public function Migration::getIdMap in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Entity/Migration.php \Drupal\migrate\Entity\Migration::getIdMap()

Returns the initialized id_map plugin.

Return value

\Drupal\migrate\Plugin\MigrateIdMapInterface The ID map.

Overrides MigrationInterface::getIdMap

File

core/modules/migrate/src/Entity/Migration.php, line 335
Contains \Drupal\migrate\Entity\Migration.

Class

Migration
Defines the Migration entity.

Namespace

Drupal\migrate\Entity

Code

public function getIdMap() {
  if (!isset($this->idMapPlugin)) {
    $configuration = $this->idMap;
    $plugin = isset($configuration['plugin']) ? $configuration['plugin'] : 'sql';
    $this->idMapPlugin = \Drupal::service('plugin.manager.migrate.id_map')
      ->createInstance($plugin, $configuration, $this);
  }
  return $this->idMapPlugin;
}