public function MigrationPluginsAlterer::paragraphsMigrationEntityTypeAdjust

Map field_collection_item and 'paragraphs_item' fields to 'paragraph'.

Parameters

array $migration: Thei migration to process.

string $process_property: The process destination.

1 call to MigrationPluginsAlterer::paragraphsMigrationEntityTypeAdjust()
MigrationPluginsAlterer::alterMigrationPlugins in paragraphs/src/MigrationPluginsAlterer.php
Adds field collection and paragraph migration dependencies where needed.

File

paragraphs/src/MigrationPluginsAlterer.php, line 65

Class

MigrationPluginsAlterer
Class MigrationPluginsAlterer.

Namespace

Drupal\paragraphs

Code

public function paragraphsMigrationEntityTypeAdjust(array &$migration, $process_property) {
  if (!$this
    ->paragraphsMigrationPrepareProcess($migration['process'], $process_property)) {
    return;
  }
  $entity_type_process =& $migration['process'][$process_property];
  $entity_type_process[] = [
    'plugin' => 'static_map',
    'map' => [
      'field_collection_item' => 'paragraph',
      'paragraphs_item' => 'paragraph',
    ],
    'bypass' => TRUE,
  ];
}