Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / file / src / Plugin / migrate / cckfield / d7 / ImageField.php
1 <?php
2
3 namespace Drupal\file\Plugin\migrate\cckfield\d7;
4
5 @trigger_error('ImageField is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\file\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  * )
15  *
16  * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use
17  * \Drupal\file\Plugin\migrate\field\d7\ImageField instead.
18  *
19  * @see https://www.drupal.org/node/2751897
20  */
21 class ImageField extends CckFieldPluginBase {
22
23   /**
24    * {@inheritdoc}
25    */
26   public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
27     $process = [
28       'plugin' => 'sub_process',
29       'source' => $field_name,
30       'process' => [
31         'target_id' => 'fid',
32         'alt' => 'alt',
33         'title' => 'title',
34         'width' => 'width',
35         'height' => 'height',
36       ],
37     ];
38     $migration->mergeProcessOfProperty($field_name, $process);
39   }
40
41 }