GatherContentReferenceRevision.php in GatherContent 8.5
File
src/Plugin/migrate/process/GatherContentReferenceRevision.php
View source
<?php
namespace Drupal\gathercontent\Plugin\migrate\process;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class GatherContentReferenceRevision extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (!is_array($value)) {
$value = [
$value,
];
}
$return = [];
foreach ($value as $data) {
$return[] = [
'id' => $data,
];
}
return $return;
}
public function multiple() {
return TRUE;
}
}