You are here

public function CommerceCustomerProfileReference::defineValueProcessPipeline in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/commerce/src/Plugin/migrate/field/commerce1/CommerceCustomerProfileReference.php \Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1\CommerceCustomerProfileReference::defineValueProcessPipeline()
  2. 3.0.x modules/commerce/src/Plugin/migrate/field/commerce1/CommerceCustomerProfileReference.php \Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1\CommerceCustomerProfileReference::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 CommerceCustomerProfileReference::defineValueProcessPipeline()
CommerceCustomerProfileReference::processFieldValues in modules/commerce/src/Plugin/migrate/field/commerce1/CommerceCustomerProfileReference.php
Defines the process pipeline for field values.

File

modules/commerce/src/Plugin/migrate/field/commerce1/CommerceCustomerProfileReference.php, line 45

Class

CommerceCustomerProfileReference
Field migration for the Customer Profile Reference field.

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' => 'commerce_migrate_commerce_reference_revision',
    'migration' => 'commerce1_profile',
    'source' => $field_name,
    'no_stub' => TRUE,
  ];
  $migration
    ->setProcessOfProperty($destination_field_name, $process);
}