You are here

public function ImageField::defineValueProcessPipeline in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/image/src/Plugin/migrate/field/d7/ImageField.php \Drupal\image\Plugin\migrate\field\d7\ImageField::defineValueProcessPipeline()

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 FieldPluginBase::defineValueProcessPipeline

File

core/modules/image/src/Plugin/migrate/field/d7/ImageField.php, line 21

Class

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

Namespace

Drupal\image\Plugin\migrate\field\d7

Code

public function defineValueProcessPipeline(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);
}