function MediaDevelGenerate::batchPreGenerate

Same name in other branches
  1. 4.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 317

Class

MediaDevelGenerate
Provides a plugin that generates media entities.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

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