Features and enhancements
- #1201762 - Implemented built-in caching for source counts, and flag to enable it.
+- #1205278 - Added preserve_files argument to MigrateFileFieldHandler.
- #1205278 - Added preserve_files option to MigrateDestinationFile.
- #1078368 - Implemented create_term argument for term references, to lazy-create terms.
- #1199150 - Added file_fid function to file field migration.
$file_array = $this->buildFileArray($entity, $field_info, $instance, $migration, $arguments, $value);
if (!empty($file_array)) {
$return[$language][$delta] = $file_array;
+ if (!empty($arguments['preserve_files'])) {
+ file_usage_add((object)$file_array, 'migrate', 'file', $file_array['fid']);
+ }
}
}
}
* array('source_field' => 'source_field_name') to obtain the display value from
* the query field named source_field_name.
*/
- static function arguments($source_path = NULL, $file_function = 'file_copy', $file_replace = FILE_EXISTS_RENAME, $language = NULL, $alt = NULL, $title = NULL, $description = NULL, $display = NULL) {
+ static function arguments($source_path = NULL, $file_function = 'file_copy',
+ $file_replace = FILE_EXISTS_RENAME, $language = NULL, $alt = NULL, $title = NULL,
+ $description = NULL, $display = NULL, $preserve_files = FALSE) {
return get_defined_vars();
}
}