RangeFieldSettings.php in Range 8
File
src/Plugin/migrate/process/d6/RangeFieldSettings.php
View source
<?php
namespace Drupal\range\Plugin\migrate\process\d6;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class RangeFieldSettings extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
list($field_type, $global_settings) = $value;
if ($field_type === 'range_decimal') {
return [
'precision' => $global_settings['precision'],
'scale' => $global_settings['scale'],
];
}
else {
return [];
}
}
}