Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / image / src / Plugin / migrate / field / d7 / ImageField.php
1 <?php
2
3 namespace Drupal\image\Plugin\migrate\field\d7;
4
5 use Drupal\migrate\Plugin\MigrationInterface;
6 use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
7
8 /**
9  * @MigrateField(
10  *   id = "image",
11  *   core = {7},
12  *   source_module = "image",
13  *   destination_module = "image"
14  * )
15  */
16 class ImageField extends FieldPluginBase {
17
18   /**
19    * {@inheritdoc}
20    */
21   public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
22     $process = [
23       'plugin' => 'sub_process',
24       'source' => $field_name,
25       'process' => [
26         'target_id' => 'fid',
27         'alt' => 'alt',
28         'title' => 'title',
29         'width' => 'width',
30         'height' => 'height',
31       ],
32     ];
33     $migration->mergeProcessOfProperty($field_name, $process);
34   }
35
36 }