You are here

protected function MigrateToolsCommands::getSourceIdKeys in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8.4 src/Commands/MigrateToolsCommands.php \Drupal\migrate_tools\Commands\MigrateToolsCommands::getSourceIdKeys()

Get the source ID keys.

Parameters

\Drupal\migrate_tools\IdMapFilter $map: The migration ID map.

Return value

array The source ID keys.

1 call to MigrateToolsCommands::getSourceIdKeys()
MigrateToolsCommands::messages in src/Commands/MigrateToolsCommands.php
View any messages associated with a migration.

File

src/Commands/MigrateToolsCommands.php, line 720

Class

MigrateToolsCommands
Migrate Tools drush commands.

Namespace

Drupal\migrate_tools\Commands

Code

protected function getSourceIdKeys(IdMapFilter $map) {
  $map
    ->rewind();
  $columns = $map
    ->currentSource();
  $source_id_keys = array_map(static function ($id) {
    return 'src_' . $id;
  }, array_keys($columns));
  return array_combine($source_id_keys, $source_id_keys);
}