You are here

public function Product::initializeIterator in Commerce Migrate 3.0.x

Same name in this branch
  1. 3.0.x modules/csv_example/src/Plugin/migrate/source/Product.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\Product::initializeIterator()
  2. 3.0.x modules/magento/src/Plugin/migrate/source/m2/Product.php \Drupal\commerce_migrate_magento\Plugin\migrate\source\m2\Product::initializeIterator()
Same name and namespace in other branches
  1. 8.2 modules/csv_example/src/Plugin/migrate/source/Product.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\Product::initializeIterator()
  2. 3.1.x modules/csv_example/src/Plugin/migrate/source/Product.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\Product::initializeIterator()

File

modules/csv_example/src/Plugin/migrate/source/Product.php, line 32

Class

Product
Builds the product rows.

Namespace

Drupal\commerce_migrate_csv_example\Plugin\migrate\source

Code

public function initializeIterator() {
  $file = parent::initializeIterator();

  // Get the product rows.
  $rows = $this
    ->getProductsWithVariations($file);
  return new \ArrayIterator($rows);
}