You are here

public function MediaDevelGenerate::batchMediaKill in Devel 4.x

Same name and namespace in other branches
  1. 8.3 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.

array $context: Batch job context.

See also

self::mediaKill()

File

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

Class

MediaDevelGenerate
Provides a plugin that generates media entities.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

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