You are here

protected function FieldCollection::addViewModeProcess in Paragraphs 8

Adds process for view mode settings.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration.

1 call to FieldCollection::addViewModeProcess()
FieldCollection::alterFieldFormatterMigration in src/Plugin/migrate/field/FieldCollection.php
Apply any custom processing to the field formatter migration.

File

src/Plugin/migrate/field/FieldCollection.php, line 136

Class

FieldCollection
Field Plugin for field collection migrations.

Namespace

Drupal\paragraphs\Plugin\migrate\field

Code

protected function addViewModeProcess(MigrationInterface $migration) {
  $view_mode = [
    'field_collection' => [
      'plugin' => 'paragraphs_process_on_value',
      'source_value' => 'type',
      'expected_value' => 'field_collection',
      'process' => [
        'plugin' => 'get',
        'source' => 'formatter/settings/view_mode',
      ],
    ],
  ];
  $migration
    ->mergeProcessOfProperty('options/settings/view_mode', $view_mode);
}