RangeFieldInstanceSettings.php in Range 8
File
src/Plugin/migrate/process/d7/RangeFieldInstanceSettings.php
View source
<?php
namespace Drupal\range\Plugin\migrate\process\d7;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class RangeFieldInstanceSettings extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
list($instance_settings) = $value;
unset($instance_settings['from']['label'], $instance_settings['to']['label']);
$allowed_settings = [
'max' => NULL,
'min' => NULL,
'field' => NULL,
'from' => NULL,
'to' => NULL,
'combined' => NULL,
];
return array_intersect_key($instance_settings, $allowed_settings);
}
}