function drush_migrate_tools_migrate_fields_source in Migrate Tools 8.3
Same name and namespace in other branches
- 8 migrate_tools.drush.inc \drush_migrate_tools_migrate_fields_source()
- 8.2 migrate_tools.drush.inc \drush_migrate_tools_migrate_fields_source()
- 8.4 migrate_tools.drush.inc \drush_migrate_tools_migrate_fields_source()
Parameters
string $migration_id:
File
- ./
migrate_tools.drush.inc, line 421 - Command-line tools to aid performing and developing migrations.
Code
function drush_migrate_tools_migrate_fields_source($migration_id) {
/** @var MigrationInterface $migration */
$migration = \Drupal::service('plugin.manager.migration')
->createInstance($migration_id);
if ($migration) {
$source = $migration
->getSourcePlugin();
$table = [];
foreach ($source
->fields() as $machine_name => $description) {
$table[] = [
strip_tags($description),
$machine_name,
];
}
drush_print_table($table);
}
else {
drush_log(dt('Migration @id does not exist', [
'@id' => $migration_id,
]), 'error');
}
}