public function CommerceProductReference::defineValueProcessPipeline in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x modules/commerce/src/Plugin/migrate/field/commerce1/CommerceProductReference.php \Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1\CommerceProductReference::defineValueProcessPipeline()
- 3.0.x modules/commerce/src/Plugin/migrate/field/commerce1/CommerceProductReference.php \Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1\CommerceProductReference::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 CommerceProductReference::defineValueProcessPipeline()
- CommerceProductReference::processFieldValues in modules/
commerce/ src/ Plugin/ migrate/ field/ commerce1/ CommerceProductReference.php - Defines the process pipeline for field values.
File
- modules/
commerce/ src/ Plugin/ migrate/ field/ commerce1/ CommerceProductReference.php, line 33
Class
- CommerceProductReference
- Field migration for commerce_product reference.
Namespace
Drupal\commerce_migrate_commerce\Plugin\migrate\field\commerce1Code
public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'target_id' => 'product_id',
],
];
$migration
->setProcessOfProperty($field_name, $process);
}