X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffile%2Fsrc%2FPlugin%2Fmigrate%2Ffield%2Fd7%2FImageField.php;fp=web%2Fcore%2Fmodules%2Ffile%2Fsrc%2FPlugin%2Fmigrate%2Ffield%2Fd7%2FImageField.php;h=29da4d2b673092f89cf96ae26ba29e02839a76ef;hp=903d3e3969f538847a8c809ed22c95200d474ce0;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php b/web/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php index 903d3e396..29da4d2b6 100644 --- a/web/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php +++ b/web/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php @@ -2,33 +2,16 @@ namespace Drupal\file\Plugin\migrate\field\d7; -use Drupal\migrate\Plugin\MigrationInterface; -use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; +@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. See https://www.drupal.org/node/2936061.', E_USER_DEPRECATED); + +use Drupal\image\Plugin\migrate\field\d7\ImageField as NonLegacyImageField; /** - * @MigrateField( - * id = "image", - * core = {7} - * ) + * Field plugin for image fields. + * + * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use + * \Drupal\image\Plugin\migrate\field\d7\ImageField instead. + * + * @see https://www.drupal.org/node/2936061 */ -class ImageField extends FieldPluginBase { - - /** - * {@inheritdoc} - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - $process = [ - 'plugin' => 'sub_process', - 'source' => $field_name, - 'process' => [ - 'target_id' => 'fid', - 'alt' => 'alt', - 'title' => 'title', - 'width' => 'width', - 'height' => 'height', - ], - ]; - $migration->mergeProcessOfProperty($field_name, $process); - } - -} +class ImageField extends NonLegacyImageField {}