You are here

public function Migration::getIdMap in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getIdMap()
  2. 10 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\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/Plugin/Migration.php, line 411

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function getIdMap() {
  if (!isset($this->idMapPlugin)) {
    $configuration = $this->idMap;
    $plugin = isset($configuration['plugin']) ? $configuration['plugin'] : 'sql';
    $this->idMapPlugin = $this->idMapPluginManager
      ->createInstance($plugin, $configuration, $this);
  }
  return $this->idMapPlugin;
}