FieldTypeDefaults.php in Drupal 10
File
core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php
View source
<?php
namespace Drupal\field\Plugin\migrate\process\d7;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
class FieldTypeDefaults extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (is_array($value) && isset($value[1])) {
return $value[1];
}
return $value;
}
}