Newer
Older
Alex Pott
committed
<?php
namespace Drupal\file\Plugin\migrate\cckfield\d7;
Alex Pott
committed
@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);
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
Alex Pott
committed
/**
* @MigrateCckField(
* id = "image",
* core = {7}
Alex Pott
committed
* )
*
* @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use
* \Drupal\file\Plugin\migrate\field\d7\ImageField instead.
*
* @see https://www.drupal.org/node/2751897
Alex Pott
committed
*/
class ImageField extends CckFieldPluginBase {
Alex Pott
committed
/**
* {@inheritdoc}
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
Alex Pott
committed
$process = [
'plugin' => 'iterator',
'source' => $field_name,
'process' => [
'target_id' => 'fid',
'alt' => 'alt',
'title' => 'title',
'width' => 'width',
'height' => 'height',
],
];
$migration->mergeProcessOfProperty($field_name, $process);
}
}