You are here

public function CommercePrice::defineValueProcessPipeline in Commerce Migrate 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/commerce/src/Plugin/migrate/field/commerce1/CommercePrice.php \Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1\CommercePrice::defineValueProcessPipeline()
  2. 3.1.x modules/commerce/src/Plugin/migrate/field/commerce1/CommercePrice.php \Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1\CommercePrice::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

1 call to CommercePrice::defineValueProcessPipeline()
CommercePrice::processFieldValues in modules/commerce/src/Plugin/migrate/field/commerce1/CommercePrice.php

File

modules/commerce/src/Plugin/migrate/field/commerce1/CommercePrice.php, line 66

Class

CommercePrice
Commerce price migrate field plugin.

Namespace

Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1

Code

public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
  $destination_field_name = isset($this->fieldNameMap[$field_name]) ? $this->fieldNameMap[$field_name] : $field_name;
  $process = [
    'plugin' => 'commerce1_migrate_commerce_price',
    'source' => $field_name,
  ];
  $migration
    ->setProcessOfProperty($destination_field_name, $process);
}