You are here

public function MediaDevelGenerate::batchCreateMediaItem in Media entity 8

Batch version of createMediaItem().

Parameters

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

array $context: Batch job context.

File

src/Plugin/DevelGenerate/MediaDevelGenerate.php, line 328

Class

MediaDevelGenerate
Provides a MediaDevelGenerate plugin.

Namespace

Drupal\media_entity\Plugin\DevelGenerate

Code

public function batchCreateMediaItem($vars, &$context) {
  $this
    ->createMediaItem($context['results']);
  $context['results']['num']++;
}