function MediaDevelGenerate::batchMediaKill

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

Provides a batch version of mediaKill().

Parameters

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

iterable $context: Batch job context.

See also

self::mediaKill()

File

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

Class

MediaDevelGenerate
Provides a plugin that generates media entities.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

public function batchMediaKill(array $vars, iterable &$context) : void {
    if ($this->drushBatch) {
        $this->mediaKill($vars);
    }
    else {
        $this->mediaKill($context['results']);
    }
}