Issue #3184650 by geek-merlin, quietone, benjifisher, alexpott: ContentEntity migration source adds revision ID as source key, incompatible with Drupal 8.8 and earlier
parent
24eb025a56
commit
75efbd32eb
|
@ -30,16 +30,26 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
* of this bundle.
|
* of this bundle.
|
||||||
* - include_translations: (optional) Indicates if the entity translations
|
* - include_translations: (optional) Indicates if the entity translations
|
||||||
* should be included, defaults to TRUE.
|
* should be included, defaults to TRUE.
|
||||||
|
* - add_revision_id: (optional) Indicates if the revision key is added to the
|
||||||
|
* source IDs, defaults to TRUE.
|
||||||
*
|
*
|
||||||
* Examples:
|
* Examples:
|
||||||
*
|
*
|
||||||
* This will return all nodes, from every bundle and every translation. It does
|
* This will return the default revision for all nodes, from every bundle and
|
||||||
* not return all revisions, just the default one.
|
* every translation. The revision key is added to the source IDs.
|
||||||
* @code
|
* @code
|
||||||
* source:
|
* source:
|
||||||
* plugin: content_entity:node
|
* plugin: content_entity:node
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
|
* This will return the default revision for all nodes, from every bundle and
|
||||||
|
* every translation. The revision key is not added to the source IDs.
|
||||||
|
* @code
|
||||||
|
* source:
|
||||||
|
* plugin: content_entity:node
|
||||||
|
* add_revision_id: false
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
* This will only return nodes of type 'article' in their default language.
|
* This will only return nodes of type 'article' in their default language.
|
||||||
* @code
|
* @code
|
||||||
* source:
|
* source:
|
||||||
|
@ -93,6 +103,7 @@ class ContentEntity extends SourcePluginBase implements ContainerFactoryPluginIn
|
||||||
protected $defaultConfiguration = [
|
protected $defaultConfiguration = [
|
||||||
'bundle' => NULL,
|
'bundle' => NULL,
|
||||||
'include_translations' => TRUE,
|
'include_translations' => TRUE,
|
||||||
|
'add_revision_id' => TRUE,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -265,7 +276,7 @@ class ContentEntity extends SourcePluginBase implements ContainerFactoryPluginIn
|
||||||
public function getIds() {
|
public function getIds() {
|
||||||
$id_key = $this->entityType->getKey('id');
|
$id_key = $this->entityType->getKey('id');
|
||||||
$ids[$id_key] = $this->getDefinitionFromEntity($id_key);
|
$ids[$id_key] = $this->getDefinitionFromEntity($id_key);
|
||||||
if ($this->entityType->isRevisionable()) {
|
if ($this->configuration['add_revision_id'] && $this->entityType->isRevisionable()) {
|
||||||
$revision_key = $this->entityType->getKey('revision');
|
$revision_key = $this->entityType->getKey('revision');
|
||||||
$ids[$revision_key] = $this->getDefinitionFromEntity($revision_key);
|
$ids[$revision_key] = $this->getDefinitionFromEntity($revision_key);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
namespace Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source;
|
namespace Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source;
|
||||||
|
|
||||||
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
|
use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
|
||||||
|
use Drupal\Component\Plugin\PluginBase;
|
||||||
use Drupal\Core\Field\FieldStorageDefinitionInterface;
|
use Drupal\Core\Field\FieldStorageDefinitionInterface;
|
||||||
use Drupal\Core\Language\LanguageInterface;
|
use Drupal\Core\Language\LanguageInterface;
|
||||||
use Drupal\file\Entity\File;
|
use Drupal\file\Entity\File;
|
||||||
use Drupal\KernelTests\KernelTestBase;
|
use Drupal\KernelTests\KernelTestBase;
|
||||||
use Drupal\language\Entity\ConfigurableLanguage;
|
use Drupal\language\Entity\ConfigurableLanguage;
|
||||||
use Drupal\media\Entity\Media;
|
use Drupal\media\Entity\Media;
|
||||||
|
use Drupal\migrate\Plugin\MigrateSourceInterface;
|
||||||
use Drupal\migrate\Plugin\MigrationInterface;
|
use Drupal\migrate\Plugin\MigrationInterface;
|
||||||
use Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity;
|
use Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity;
|
||||||
use Drupal\node\Entity\Node;
|
use Drupal\node\Entity\Node;
|
||||||
|
@ -85,13 +87,6 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
*/
|
*/
|
||||||
protected $migrationPluginManager;
|
protected $migrationPluginManager;
|
||||||
|
|
||||||
/**
|
|
||||||
* The source plugin manager.
|
|
||||||
*
|
|
||||||
* @var \Drupal\migrate\Plugin\MigrateSourcePluginManager
|
|
||||||
*/
|
|
||||||
protected $sourcePluginManager;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -175,7 +170,6 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
$this->fieldName => $term->id(),
|
$this->fieldName => $term->id(),
|
||||||
])->save();
|
])->save();
|
||||||
|
|
||||||
$this->sourcePluginManager = $this->container->get('plugin.manager.migrate.source');
|
|
||||||
$this->migrationPluginManager = $this->container->get('plugin.manager.migration');
|
$this->migrationPluginManager = $this->container->get('plugin.manager.migration');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,19 +234,48 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests user source plugin.
|
* Helper to assert IDs structure.
|
||||||
|
*
|
||||||
|
* @param \Drupal\migrate\Plugin\MigrateSourceInterface $source
|
||||||
|
* The source plugin.
|
||||||
|
* @param array $configuration
|
||||||
|
* The source plugin configuration (Nope, no getter available).
|
||||||
*/
|
*/
|
||||||
public function testUserSource() {
|
protected function assertIds(MigrateSourceInterface $source, array $configuration) {
|
||||||
$configuration = [
|
$ids = $source->getIds();
|
||||||
'include_translations' => FALSE,
|
[, $entity_type_id] = explode(PluginBase::DERIVATIVE_SEPARATOR, $source->getPluginId());
|
||||||
];
|
$entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id);
|
||||||
$migration = $this->migrationPluginManager->createStubMigration($this->migrationDefinition('content_entity:user'));
|
|
||||||
$user_source = $this->sourcePluginManager->createInstance('content_entity:user', $configuration, $migration);
|
$this->assertArrayHasKey($entity_type->getKey('id'), $ids);
|
||||||
|
$ids_count_expected = 1;
|
||||||
|
|
||||||
|
if ($entity_type->isTranslatable()) {
|
||||||
|
$ids_count_expected++;
|
||||||
|
$this->assertArrayHasKey($entity_type->getKey('langcode'), $ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($entity_type->isRevisionable() && $configuration['add_revision_id']) {
|
||||||
|
$ids_count_expected++;
|
||||||
|
$this->assertArrayHasKey($entity_type->getKey('revision'), $ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->assertCount($ids_count_expected, $ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests user source plugin.
|
||||||
|
*
|
||||||
|
* @dataProvider migrationConfigurationProvider
|
||||||
|
*/
|
||||||
|
public function testUserSource(array $configuration) {
|
||||||
|
$migration = $this->migrationPluginManager
|
||||||
|
->createStubMigration($this->migrationDefinition('content_entity:user', $configuration));
|
||||||
|
$user_source = $migration->getSourcePlugin();
|
||||||
$this->assertSame('users', $user_source->__toString());
|
$this->assertSame('users', $user_source->__toString());
|
||||||
$this->assertEquals(1, $user_source->count());
|
if (!$configuration['include_translations']) {
|
||||||
$ids = $user_source->getIds();
|
$this->assertEquals(1, $user_source->count());
|
||||||
$this->assertArrayHasKey('langcode', $ids);
|
}
|
||||||
$this->assertArrayHasKey('uid', $ids);
|
$this->assertIds($user_source, $configuration);
|
||||||
$fields = $user_source->fields();
|
$fields = $user_source->fields();
|
||||||
$this->assertArrayHasKey('name', $fields);
|
$this->assertArrayHasKey('name', $fields);
|
||||||
$this->assertArrayHasKey('pass', $fields);
|
$this->assertArrayHasKey('pass', $fields);
|
||||||
|
@ -269,8 +292,10 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests file source plugin.
|
* Tests file source plugin.
|
||||||
|
*
|
||||||
|
* @dataProvider migrationConfigurationProvider
|
||||||
*/
|
*/
|
||||||
public function testFileSource() {
|
public function testFileSource(array $configuration) {
|
||||||
$file = File::create([
|
$file = File::create([
|
||||||
'filename' => 'foo.txt',
|
'filename' => 'foo.txt',
|
||||||
'uid' => $this->user->id(),
|
'uid' => $this->user->id(),
|
||||||
|
@ -278,15 +303,14 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
]);
|
]);
|
||||||
$file->save();
|
$file->save();
|
||||||
|
|
||||||
$configuration = [
|
$migration = $this->migrationPluginManager
|
||||||
'include_translations' => FALSE,
|
->createStubMigration($this->migrationDefinition('content_entity:file', $configuration));
|
||||||
];
|
$file_source = $migration->getSourcePlugin();
|
||||||
$migration = $this->migrationPluginManager->createStubMigration($this->migrationDefinition('content_entity:file'));
|
|
||||||
$file_source = $this->sourcePluginManager->createInstance('content_entity:file', $configuration, $migration);
|
|
||||||
$this->assertSame('files', $file_source->__toString());
|
$this->assertSame('files', $file_source->__toString());
|
||||||
$this->assertEquals(1, $file_source->count());
|
if (!$configuration['include_translations']) {
|
||||||
$ids = $file_source->getIds();
|
$this->assertEquals(1, $file_source->count());
|
||||||
$this->assertArrayHasKey('fid', $ids);
|
}
|
||||||
|
$this->assertIds($file_source, $configuration);
|
||||||
$fields = $file_source->fields();
|
$fields = $file_source->fields();
|
||||||
$this->assertArrayHasKey('fid', $fields);
|
$this->assertArrayHasKey('fid', $fields);
|
||||||
$this->assertArrayHasKey('filemime', $fields);
|
$this->assertArrayHasKey('filemime', $fields);
|
||||||
|
@ -303,14 +327,16 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests node source plugin.
|
* Tests node source plugin.
|
||||||
|
*
|
||||||
|
* @dataProvider migrationConfigurationProvider
|
||||||
*/
|
*/
|
||||||
public function testNodeSource() {
|
public function testNodeSource(array $configuration) {
|
||||||
$migration = $this->migrationPluginManager->createStubMigration($this->migrationDefinition('content_entity:node'));
|
$configuration += ['bundle' => $this->bundle];
|
||||||
$node_source = $this->sourcePluginManager->createInstance('content_entity:node', ['bundle' => $this->bundle], $migration);
|
$migration = $this->migrationPluginManager
|
||||||
|
->createStubMigration($this->migrationDefinition('content_entity:node', $configuration));
|
||||||
|
$node_source = $migration->getSourcePlugin();
|
||||||
$this->assertSame('content items', $node_source->__toString());
|
$this->assertSame('content items', $node_source->__toString());
|
||||||
$ids = $node_source->getIds();
|
$this->assertIds($node_source, $configuration);
|
||||||
$this->assertArrayHasKey('langcode', $ids);
|
|
||||||
$this->assertArrayHasKey('nid', $ids);
|
|
||||||
$fields = $node_source->fields();
|
$fields = $node_source->fields();
|
||||||
$this->assertArrayHasKey('nid', $fields);
|
$this->assertArrayHasKey('nid', $fields);
|
||||||
$this->assertArrayHasKey('vid', $fields);
|
$this->assertArrayHasKey('vid', $fields);
|
||||||
|
@ -321,28 +347,42 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
$values = $node_source->current()->getSource();
|
$values = $node_source->current()->getSource();
|
||||||
$this->assertEquals($this->bundle, $values['type'][0]['target_id']);
|
$this->assertEquals($this->bundle, $values['type'][0]['target_id']);
|
||||||
$this->assertEquals(1, $values['nid']);
|
$this->assertEquals(1, $values['nid']);
|
||||||
$this->assertEquals(1, $values['vid']);
|
if ($configuration['add_revision_id']) {
|
||||||
|
$this->assertEquals(1, $values['vid']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->assertEquals([['value' => '1']], $values['vid']);
|
||||||
|
}
|
||||||
$this->assertEquals('en', $values['langcode']);
|
$this->assertEquals('en', $values['langcode']);
|
||||||
$this->assertEquals(1, $values['status'][0]['value']);
|
$this->assertEquals(1, $values['status'][0]['value']);
|
||||||
$this->assertEquals('Apples', $values['title'][0]['value']);
|
$this->assertEquals('Apples', $values['title'][0]['value']);
|
||||||
$this->assertEquals(1, $values['default_langcode'][0]['value']);
|
$this->assertEquals(1, $values['default_langcode'][0]['value']);
|
||||||
$this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
|
$this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
|
||||||
$node_source->next();
|
if ($configuration['include_translations']) {
|
||||||
$values = $node_source->current()->getSource();
|
$node_source->next();
|
||||||
$this->assertEquals($this->bundle, $values['type'][0]['target_id']);
|
$values = $node_source->current()->getSource();
|
||||||
$this->assertEquals(1, $values['nid']);
|
$this->assertEquals($this->bundle, $values['type'][0]['target_id']);
|
||||||
$this->assertEquals(1, $values['vid']);
|
$this->assertEquals(1, $values['nid']);
|
||||||
$this->assertEquals('fr', $values['langcode']);
|
if ($configuration['add_revision_id']) {
|
||||||
$this->assertEquals(1, $values['status'][0]['value']);
|
$this->assertEquals(1, $values['vid']);
|
||||||
$this->assertEquals('Pommes', $values['title'][0]['value']);
|
}
|
||||||
$this->assertEquals(0, $values['default_langcode'][0]['value']);
|
else {
|
||||||
$this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
|
$this->assertEquals([0 => ['value' => 1]], $values['vid']);
|
||||||
|
}
|
||||||
|
$this->assertEquals('fr', $values['langcode']);
|
||||||
|
$this->assertEquals(1, $values['status'][0]['value']);
|
||||||
|
$this->assertEquals('Pommes', $values['title'][0]['value']);
|
||||||
|
$this->assertEquals(0, $values['default_langcode'][0]['value']);
|
||||||
|
$this->assertEquals(1, $values['field_entity_reference'][0]['target_id']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests media source plugin.
|
* Tests media source plugin.
|
||||||
|
*
|
||||||
|
* @dataProvider migrationConfigurationProvider
|
||||||
*/
|
*/
|
||||||
public function testMediaSource() {
|
public function testMediaSource(array $configuration) {
|
||||||
$values = [
|
$values = [
|
||||||
'id' => 'image',
|
'id' => 'image',
|
||||||
'label' => 'Image',
|
'label' => 'Image',
|
||||||
|
@ -357,17 +397,17 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
]);
|
]);
|
||||||
$media->save();
|
$media->save();
|
||||||
|
|
||||||
$configuration = [
|
$configuration += [
|
||||||
'include_translations' => FALSE,
|
|
||||||
'bundle' => 'image',
|
'bundle' => 'image',
|
||||||
];
|
];
|
||||||
$migration = $this->migrationPluginManager->createStubMigration($this->migrationDefinition('content_entity:media'));
|
$migration = $this->migrationPluginManager
|
||||||
$media_source = $this->sourcePluginManager->createInstance('content_entity:media', $configuration, $migration);
|
->createStubMigration($this->migrationDefinition('content_entity:media', $configuration));
|
||||||
|
$media_source = $migration->getSourcePlugin();
|
||||||
$this->assertSame('media items', $media_source->__toString());
|
$this->assertSame('media items', $media_source->__toString());
|
||||||
$this->assertEquals(1, $media_source->count());
|
if (!$configuration['include_translations']) {
|
||||||
$ids = $media_source->getIds();
|
$this->assertEquals(1, $media_source->count());
|
||||||
$this->assertArrayHasKey('langcode', $ids);
|
}
|
||||||
$this->assertArrayHasKey('mid', $ids);
|
$this->assertIds($media_source, $configuration);
|
||||||
$fields = $media_source->fields();
|
$fields = $media_source->fields();
|
||||||
$this->assertArrayHasKey('bundle', $fields);
|
$this->assertArrayHasKey('bundle', $fields);
|
||||||
$this->assertArrayHasKey('mid', $fields);
|
$this->assertArrayHasKey('mid', $fields);
|
||||||
|
@ -377,7 +417,12 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
$media_source->rewind();
|
$media_source->rewind();
|
||||||
$values = $media_source->current()->getSource();
|
$values = $media_source->current()->getSource();
|
||||||
$this->assertEquals(1, $values['mid']);
|
$this->assertEquals(1, $values['mid']);
|
||||||
$this->assertEquals(1, $values['vid']);
|
if ($configuration['add_revision_id']) {
|
||||||
|
$this->assertEquals(1, $values['vid']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->assertEquals([['value' => 1]], $values['vid']);
|
||||||
|
}
|
||||||
$this->assertEquals('Foo media', $values['name'][0]['value']);
|
$this->assertEquals('Foo media', $values['name'][0]['value']);
|
||||||
$this->assertNull($values['thumbnail'][0]['title']);
|
$this->assertNull($values['thumbnail'][0]['title']);
|
||||||
$this->assertEquals(1, $values['uid'][0]['target_id']);
|
$this->assertEquals(1, $values['uid'][0]['target_id']);
|
||||||
|
@ -386,8 +431,10 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests term source plugin.
|
* Tests term source plugin.
|
||||||
|
*
|
||||||
|
* @dataProvider migrationConfigurationProvider
|
||||||
*/
|
*/
|
||||||
public function testTermSource() {
|
public function testTermSource(array $configuration) {
|
||||||
$term2 = Term::create([
|
$term2 = Term::create([
|
||||||
'vid' => $this->vocabulary,
|
'vid' => $this->vocabulary,
|
||||||
'name' => 'Granny Smith',
|
'name' => 'Granny Smith',
|
||||||
|
@ -396,18 +443,17 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
]);
|
]);
|
||||||
$term2->save();
|
$term2->save();
|
||||||
|
|
||||||
$configuration = [
|
$configuration += [
|
||||||
'include_translations' => FALSE,
|
|
||||||
'bundle' => $this->vocabulary,
|
'bundle' => $this->vocabulary,
|
||||||
];
|
];
|
||||||
$migration = $this->migrationPluginManager->createStubMigration($this->migrationDefinition('content_entity:taxonomy_term'));
|
$migration = $this->migrationPluginManager
|
||||||
$term_source = $this->sourcePluginManager->createInstance('content_entity:taxonomy_term', $configuration, $migration);
|
->createStubMigration($this->migrationDefinition('content_entity:taxonomy_term', $configuration));
|
||||||
|
$term_source = $migration->getSourcePlugin();
|
||||||
$this->assertSame('taxonomy terms', $term_source->__toString());
|
$this->assertSame('taxonomy terms', $term_source->__toString());
|
||||||
$this->assertEquals(2, $term_source->count());
|
if (!$configuration['include_translations']) {
|
||||||
$ids = $term_source->getIds();
|
$this->assertEquals(2, $term_source->count());
|
||||||
$this->assertArrayHasKey('langcode', $ids);
|
}
|
||||||
$this->assertArrayHasKey('revision_id', $ids);
|
$this->assertIds($term_source, $configuration);
|
||||||
$this->assertArrayHasKey('tid', $ids);
|
|
||||||
$fields = $term_source->fields();
|
$fields = $term_source->fields();
|
||||||
$this->assertArrayHasKey('vid', $fields);
|
$this->assertArrayHasKey('vid', $fields);
|
||||||
$this->assertArrayHasKey('revision_id', $fields);
|
$this->assertArrayHasKey('revision_id', $fields);
|
||||||
|
@ -429,20 +475,46 @@ class ContentEntityTest extends KernelTestBase {
|
||||||
$this->assertEquals('Granny Smith', $values['name'][0]['value']);
|
$this->assertEquals('Granny Smith', $values['name'][0]['value']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data provider for several test methods.
|
||||||
|
*
|
||||||
|
* @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testUserSource
|
||||||
|
* @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testFileSource
|
||||||
|
* @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testNodeSource
|
||||||
|
* @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testMediaSource
|
||||||
|
* @see \Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\ContentEntityTest::testTermSource
|
||||||
|
*/
|
||||||
|
public function migrationConfigurationProvider() {
|
||||||
|
$data = [];
|
||||||
|
foreach ([FALSE, TRUE] as $include_translations) {
|
||||||
|
foreach ([FALSE, TRUE] as $add_revision_id) {
|
||||||
|
$configuration = [
|
||||||
|
'include_translations' => $include_translations,
|
||||||
|
'add_revision_id' => $add_revision_id,
|
||||||
|
];
|
||||||
|
// Add an array key for this data set.
|
||||||
|
$data[http_build_query($configuration)] = [$configuration];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a migration definition.
|
* Get a migration definition.
|
||||||
*
|
*
|
||||||
* @param string $plugin_id
|
* @param string $plugin_id
|
||||||
* The plugin id.
|
* The plugin id.
|
||||||
|
* @param array $configuration
|
||||||
|
* The plugin configuration.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
* The definition.
|
* The definition.
|
||||||
*/
|
*/
|
||||||
protected function migrationDefinition($plugin_id) {
|
protected function migrationDefinition($plugin_id, array $configuration = []) {
|
||||||
return [
|
return [
|
||||||
'source' => [
|
'source' => [
|
||||||
'plugin' => $plugin_id,
|
'plugin' => $plugin_id,
|
||||||
],
|
] + $configuration,
|
||||||
'process' => [],
|
'process' => [],
|
||||||
'destination' => [
|
'destination' => [
|
||||||
'plugin' => 'null',
|
'plugin' => 'null',
|
||||||
|
|
Loading…
Reference in New Issue