Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / file / src / Plugin / migrate / cckfield / d7 / ImageField.php
index 38b9b7af9d4fbde25e75cd46d2827d31c98ef035..dc3b9cd5aa1c6b409dceeff53e179ed70a1e6cc1 100644 (file)
@@ -2,40 +2,16 @@
 
 namespace Drupal\file\Plugin\migrate\cckfield\d7;
 
-@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);
+@trigger_error('ImageField is deprecated in Drupal 8.3.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\migrate\Plugin\MigrationInterface;
-use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
+use Drupal\image\Plugin\migrate\cckfield\d7\ImageField as LegacyImageField;
 
 /**
- * @MigrateCckField(
- *   id = "image",
- *   core = {7}
- * )
+ * CCK plugin for image fields.
  *
  * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use
- * \Drupal\file\Plugin\migrate\field\d7\ImageField instead.
+ * \Drupal\image\Plugin\migrate\field\d7\ImageField instead.
  *
- * @see https://www.drupal.org/node/2751897
+ * @see https://www.drupal.org/node/2936061
  */
-class ImageField extends CckFieldPluginBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function processCckFieldValues(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 LegacyImageField {}