PhysicalWeight.php in Physical Fields 8
File
src/Plugin/migrate/process/PhysicalWeight.php
View source
<?php
namespace Drupal\physical\Plugin\migrate\process;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class PhysicalWeight extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
return [
'number' => $value['weight'],
'unit' => $value['unit'],
];
}
}