You are here

protected function Paragraphs::addViewModeProcess in Paragraphs 8

Adds process for view mode settings.

Parameters

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

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

File

src/Plugin/migrate/field/Paragraphs.php, line 149

Class

Paragraphs
Field Plugin for paragraphs migrations.

Namespace

Drupal\paragraphs\Plugin\migrate\field

Code

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