8157def995ac8379e44bfcb24ef0758cf8b7dabd
[yaffs-website] / web / core / modules / file / src / Plugin / migrate / field / d7 / FileField.php
1 <?php
2
3 namespace Drupal\file\Plugin\migrate\field\d7;
4
5 use Drupal\file\Plugin\migrate\field\d6\FileField as D6FileField;
6 use Drupal\migrate\Plugin\MigrationInterface;
7
8 /**
9  * @MigrateField(
10  *   id = "file",
11  *   core = {7},
12  *   source_module = "file",
13  *   destination_module = "file"
14  * )
15  */
16 class FileField extends D6FileField {
17
18   /**
19    * {@inheritdoc}
20    */
21   public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
22     $process = [
23       'plugin' => 'sub_process',
24       'source' => $field_name,
25       'process' => [
26         'target_id' => 'fid',
27         'display' => 'display',
28         'description' => 'description',
29       ],
30     ];
31     $migration->mergeProcessOfProperty($field_name, $process);
32   }
33
34 }