function FieldPluginBase::alterFieldWidgetMigration

Same name and namespace in other branches
  1. 8.9.x 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()
  3. 11.x core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase::alterFieldWidgetMigration()

Overrides MigrateFieldInterface::alterFieldWidgetMigration

File

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

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.