You are here

public function GenerateProducts::batchPrepareProduct in Commerce Bulk 8

File

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

Class

GenerateProducts
Provides a GenerateProducts plugin.

Namespace

Drupal\commerce_generate\Plugin\DevelGenerate

Code

public function batchPrepareProduct($vars, &$context) {
  if ($this->drushBatch) {
    $this
      ->prepareGenerateProduct($vars);
  }
  else {
    $context['results'] = $vars;
    $context['results']['num'] = 0;
    $this
      ->prepareGenerateProduct($context['results']);
  }
}