Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / file / src / Plugin / migrate / field / d7 / ImageField.php
index 903d3e3969f538847a8c809ed22c95200d474ce0..29da4d2b673092f89cf96ae26ba29e02839a76ef 100644 (file)
@@ -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 {}