081ff055be42ef9497a36da0f2d56de80fafc6d4
[yaffs-website] / web / core / modules / image / src / Plugin / migrate / cckfield / d7 / ImageField.php
1 <?php
2
3 namespace Drupal\image\Plugin\migrate\cckfield\d7;
4
5 @trigger_error('ImageField is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.x. Use \Drupal\image\Plugin\migrate\field\d7\ImageField instead.', E_USER_DEPRECATED);
6
7 use Drupal\migrate\Plugin\MigrationInterface;
8 use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
9
10 /**
11  * @MigrateCckField(
12  *   id = "image",
13  *   core = {7},
14  *   source_module = "image",
15  *   destination_module = "file"
16  * )
17  *
18  * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use
19  * \Drupal\image\Plugin\migrate\field\d7\ImageField instead.
20  *
21  * @see https://www.drupal.org/node/2751897
22  */
23 class ImageField extends CckFieldPluginBase {
24
25   /**
26    * {@inheritdoc}
27    */
28   public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
29     $process = [
30       'plugin' => 'sub_process',
31       'source' => $field_name,
32       'process' => [
33         'target_id' => 'fid',
34         'alt' => 'alt',
35         'title' => 'title',
36         'width' => 'width',
37         'height' => 'height',
38       ],
39     ];
40     $migration->mergeProcessOfProperty($field_name, $process);
41   }
42
43 }