'plugin' => 'sub_process',
'source' =>
$field_name,
'process' =>
$process,
];
$migration->
mergeProcessOfProperty($field_name,
$process);
} /**
* {@inheritdoc}
*/
public function getFieldType(Row
$row) { $field_type = parent::
getFieldType($row);
// If the 'todate' setting is specified then change the field type to
// 'daterange' so we can migrate the end date.
if ($field_type === 'datetime' && !
empty($row->
get('settings/todate'
))) { if (\Drupal::
service('module_handler'
)->
moduleExists('datetime_range'
)) { return 'daterange';
} else { throw new MigrateException(sprintf("Can't migrate field '%s' with 'todate' settings. Enable the datetime_range module. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#datetime",
$row->
get('field_name'
)));
} }