public function MediaDevelGenerate::batchPreGenerate in Devel 4.x
Same name and namespace in other branches
- 8.3 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
File
- devel_generate/
src/ Plugin/ DevelGenerate/ MediaDevelGenerate.php, line 345
Class
- MediaDevelGenerate
- Provides a plugin that generates media entities.
Namespace
Drupal\devel_generate\Plugin\DevelGenerateCode
public function batchPreGenerate(array $vars, iterable &$context) {
$context['results'] = $vars;
$context['results']['num'] = 0;
$this
->preGenerate($context['results']);
}