public function RangeField::alterFieldInstanceMigration in Range 8
Same name in this branch
- 8 src/Plugin/migrate/field/d6/RangeField.php \Drupal\range\Plugin\migrate\field\d6\RangeField::alterFieldInstanceMigration()
- 8 src/Plugin/migrate/field/d7/RangeField.php \Drupal\range\Plugin\migrate\field\d7\RangeField::alterFieldInstanceMigration()
Apply any custom processing to the field instance migration.
Parameters
\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.
Overrides FieldPluginBase::alterFieldInstanceMigration
File
- src/
Plugin/ migrate/ field/ d7/ RangeField.php, line 37
Class
- RangeField
- MigrateField Plugin for Drupal 7 range fields.
Namespace
Drupal\range\Plugin\migrate\field\d7Code
public function alterFieldInstanceMigration(MigrationInterface $migration) {
/** @var \Drupal\migrate\Row $row */
$row = $migration
->getSourcePlugin()
->current();
if ($this
->isRangeField($row
->getSourceProperty('type'))) {
$process = [
'plugin' => 'd7_range_field_instance_settings',
];
$migration
->mergeProcessOfProperty('settings', $process);
}
parent::alterFieldInstanceMigration($migration);
}