ImageField.php

Same filename in this branch
  1. 8.9.x core/modules/file/src/Plugin/migrate/field/d6/ImageField.php
  2. 8.9.x core/modules/file/src/Plugin/migrate/field/d7/ImageField.php
  3. 8.9.x core/modules/file/src/Plugin/migrate/cckfield/d7/ImageField.php
  4. 8.9.x core/modules/image/src/Plugin/migrate/field/d6/ImageField.php
  5. 8.9.x core/modules/image/src/Plugin/migrate/field/d7/ImageField.php
Same filename in other branches
  1. 9 core/modules/image/src/Plugin/migrate/field/d6/ImageField.php
  2. 9 core/modules/image/src/Plugin/migrate/field/d7/ImageField.php
  3. 10 core/modules/image/src/Plugin/migrate/field/d6/ImageField.php
  4. 10 core/modules/image/src/Plugin/migrate/field/d7/ImageField.php
  5. 11.x core/modules/image/src/Plugin/migrate/field/d6/ImageField.php
  6. 11.x core/modules/image/src/Plugin/migrate/field/d7/ImageField.php

Namespace

Drupal\image\Plugin\migrate\cckfield\d7

File

core/modules/image/src/Plugin/migrate/cckfield/d7/ImageField.php

View source
<?php

namespace Drupal\image\Plugin\migrate\cckfield\d7;

@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.', E_USER_DEPRECATED);
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;

/**
 * @MigrateCckField(
 *   id = "image",
 *   core = {7},
 *   source_module = "image",
 *   destination_module = "file"
 * )
 *
 * @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. Use
 * \Drupal\image\Plugin\migrate\field\d7\ImageField instead.
 *
 * @see https://www.drupal.org/node/2751897
 */
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);
    }

}

Classes

Title Deprecated Summary
ImageField

in drupal:8.5.0 and is removed from drupal:9.0.0. Use \Drupal\image\Plugin\migrate\field\d7\ImageField instead.

Plugin annotation @MigrateCckField( id = "image", core = {7}, source_module = "image", destination_module = "file" )

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.