You are here

public function RangeField::alterFieldWidgetMigration in Range 8

Apply any custom processing to the field widget migration.

Parameters

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

Overrides FieldPluginBase::alterFieldWidgetMigration

File

src/Plugin/migrate/field/d7/RangeField.php, line 54

Class

RangeField
MigrateField Plugin for Drupal 7 range fields.

Namespace

Drupal\range\Plugin\migrate\field\d7

Code

public function alterFieldWidgetMigration(MigrationInterface $migration) {

  /** @var \Drupal\migrate\Row $row */
  $row = $migration
    ->getSourcePlugin()
    ->current();
  if ($this
    ->isRangeField($row
    ->getSourceProperty('type'))) {
    $process = [
      'plugin' => 'd7_range_field_instance_widget_settings',
      // Range widget settings are stored in the instance settings in D7.
      'source' => 'settings',
    ];
    $migration
      ->mergeProcessOfProperty('options/settings', $process);
  }
  parent::alterFieldWidgetMigration($migration);
}