public function RangeFieldInstanceSettings::transform in Range 8
Same name in this branch
- 8 src/Plugin/migrate/process/d6/RangeFieldInstanceSettings.php \Drupal\range\Plugin\migrate\process\d6\RangeFieldInstanceSettings::transform()
- 8 src/Plugin/migrate/process/d7/RangeFieldInstanceSettings.php \Drupal\range\Plugin\migrate\process\d7\RangeFieldInstanceSettings::transform()
Set the field instance settings.
Overrides ProcessPluginBase::transform
File
- src/
Plugin/ migrate/ process/ d6/ RangeFieldInstanceSettings.php, line 24
Class
- RangeFieldInstanceSettings
- Get the range field instance settings.
Namespace
Drupal\range\Plugin\migrate\process\d6Code
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
list($widget_type, $widget_settings, $field_settings) = $value;
return [
'min' => $field_settings['min'] === '<' ? NULL : $field_settings['min'],
'max' => $field_settings['max'] === '>' ? NULL : $field_settings['max'],
'field' => [
'prefix' => $field_settings['prefix'],
'suffix' => $field_settings['suffix'],
],
];
}