You are here

protected function ContentDevelGenerate::generateElements in Devel 8.2

Same name and namespace in other branches
  1. 8.3 devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\ContentDevelGenerate::generateElements()
  2. 8 devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\ContentDevelGenerate::generateElements()
  3. 4.x devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\ContentDevelGenerate::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/ContentDevelGenerate.php, line 316

Class

ContentDevelGenerate
Provides a ContentDevelGenerate plugin.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

protected function generateElements(array $values) {
  if ($this
    ->isBatch($values['num'], $values['max_comments'])) {
    $this
      ->generateBatchContent($values);
  }
  else {
    $this
      ->generateContent($values);
  }
}