You are here

public function ImageField::processCckFieldValues in Drupal 8

Apply any custom processing to the field bundle migrations.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration entity.

string $field_name: The field name we're processing the value for.

array $data: The array of field data from FieldValues::fieldData().

Overrides CckFieldPluginBase::processCckFieldValues

File

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

Class

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

Namespace

Drupal\image\Plugin\migrate\cckfield\d7

Code

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);
}