You are here

public function FieldPluginBase::alterFieldWidgetMigration in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::alterFieldWidgetMigration()
  2. 10 core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::alterFieldWidgetMigration()

Apply any custom processing to the field widget migration.

Parameters

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

Overrides MigrateFieldInterface::alterFieldWidgetMigration

1 call to FieldPluginBase::alterFieldWidgetMigration()
FieldPluginBase::processFieldWidget in core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php
Alter field widget migration.

File

core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php, line 82

Class

FieldPluginBase
The base class for all field plugins.

Namespace

Drupal\migrate_drupal\Plugin\migrate\field

Code

public function alterFieldWidgetMigration(MigrationInterface $migration) {
  $process = [];
  foreach ($this
    ->getFieldWidgetMap() as $source_widget => $destination_widget) {
    $process['type']['map'][$source_widget] = $destination_widget;
  }
  $migration
    ->mergeProcessOfProperty('options/type', $process);
}