You are here

public function RangeFieldSettings::transform in Range 8

Get the range field settings.

Overrides ProcessPluginBase::transform

File

src/Plugin/migrate/process/d6/RangeFieldSettings.php, line 24

Class

RangeFieldSettings
Get the range field settings.

Namespace

Drupal\range\Plugin\migrate\process\d6

Code

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 [];
  }
}