You are here

protected function MediaDevelGenerate::generateElements 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::generateElements()

Business logic relating with each DevelGenerate plugin.

Parameters

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

Overrides DevelGenerateBase::generateElements

File

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

Class

MediaDevelGenerate
Provides a plugin that generates media entities.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

protected function generateElements(array $values) {
  if ($this
    ->isBatch($values['num'])) {
    $this
      ->generateBatchMedia($values);
  }
  else {
    $this
      ->generateMedia($values);
  }
}