function MediaDevelGenerate::batchPreGenerate

Same name in other branches
  1. 5.x devel_generate/src/Plugin/DevelGenerate/MediaDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\MediaDevelGenerate::batchPreGenerate()

Provides a batch version of preGenerate().

Parameters

array $vars: The input values from the settings form.

iterable $context: Batch job context.

See also

self::preGenerate()

File

devel_generate/src/Plugin/DevelGenerate/MediaDevelGenerate.php, line 346

Class

MediaDevelGenerate
Provides a plugin that generates media entities.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

public function batchPreGenerate(array $vars, iterable &$context) {
    $context['results'] = $vars;
    $context['results']['num'] = 0;
    $this->preGenerate($context['results']);
}