Skip to content
Snippets Groups Projects
Commit a931fec0 authored by Mike Ryan's avatar Mike Ryan Committed by Mike Ryan
Browse files

Issue #2819901 by mikeryan: Add 'class' to migration configuration entity schema

parent 389c4c37
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,9 @@ migrate_plus.migration.*: ...@@ -7,6 +7,9 @@ migrate_plus.migration.*:
id: id:
type: string type: string
label: 'ID' label: 'ID'
class:
type: string
label: 'Class'
migration_tags: migration_tags:
type: sequence type: sequence
label: 'Migration Tags' label: 'Migration Tags'
......
...@@ -18,6 +18,11 @@ use Drupal\migrate_plus\Event\MigratePrepareRowEvent; ...@@ -18,6 +18,11 @@ use Drupal\migrate_plus\Event\MigratePrepareRowEvent;
function migrate_plus_migration_plugins_alter(array &$migrations) { function migrate_plus_migration_plugins_alter(array &$migrations) {
/** @var \Drupal\migrate\Plugin\MigrationInterface $migration */ /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
foreach ($migrations as $id => $migration) { foreach ($migrations as $id => $migration) {
// Add the default class where empty.
if (empty($migration['class'])) {
$migrations[$id]['class'] = 'Drupal\migrate\Plugin\Migration';
}
if (empty($migration['migration_group'])) { if (empty($migration['migration_group'])) {
$migration['migration_group'] = 'default'; $migration['migration_group'] = 'default';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment