Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / file / src / Plugin / migrate / field / d7 / FileField.php
diff --git a/web/core/modules/file/src/Plugin/migrate/field/d7/FileField.php b/web/core/modules/file/src/Plugin/migrate/field/d7/FileField.php
new file mode 100644 (file)
index 0000000..cf90090
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\file\Plugin\migrate\field\d7;
+
+use Drupal\file\Plugin\migrate\field\d6\FileField as D6FileField;
+use Drupal\migrate\Plugin\MigrationInterface;
+
+/**
+ * @MigrateField(
+ *   id = "file",
+ *   core = {7}
+ * )
+ */
+class FileField extends D6FileField {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
+    $process = [
+      'plugin' => 'sub_process',
+      'source' => $field_name,
+      'process' => [
+        'target_id' => 'fid',
+        'display' => 'display',
+        'description' => 'description',
+      ],
+    ];
+    $migration->mergeProcessOfProperty($field_name, $process);
+  }
+
+}