You are here

public function GenerateProducts::batchGenerateSaveProduct in Commerce Bulk 8

File

modules/commerce_generate/src/Plugin/DevelGenerate/GenerateProducts.php, line 528

Class

GenerateProducts
Provides a GenerateProducts plugin.

Namespace

Drupal\commerce_generate\Plugin\DevelGenerate

Code

public function batchGenerateSaveProduct($vars, &$context) {
  if ($this->drushBatch) {
    $this
      ->generateSaveProduct($vars);
  }
  else {
    $this
      ->generateSaveProduct($context['results']);
    $context['results']['num']++;
  }
}