You are here

protected function ContentExporter::processVariation in Commerce Demo 8

Same name and namespace in other branches
  1. 8.2 src/ContentExporter.php \Drupal\commerce_demo\ContentExporter::processVariation()

Processes the exported product variation.

Parameters

array $export: The export array.

\Drupal\commerce_product\Entity\ProductVariationInterface $variation: The product variation.

Return value

array The processed export array.

1 call to ContentExporter::processVariation()
ContentExporter::export in src/ContentExporter.php
Exports the given entity.

File

src/ContentExporter.php, line 230

Class

ContentExporter
Defines the content exporter.

Namespace

Drupal\commerce_demo

Code

protected function processVariation(array $export, ProductVariationInterface $variation) {

  // Don't export the product_id backreference, it's automatically populated.
  unset($export['product_id']);
  return $export;
}