function ContentDevelGenerate::isBatch

Same name in other branches
  1. 5.x devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\ContentDevelGenerate::isBatch()

Determines if the content should be generated in batch mode.

2 calls to ContentDevelGenerate::isBatch()
ContentDevelGenerate::generateElements in devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php
Business logic relating with each DevelGenerate plugin.
ContentDevelGenerate::validateDrushParams in devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php
Responsible for validating Drush params.

File

devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php, line 570

Class

ContentDevelGenerate
Provides a ContentDevelGenerate plugin.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

protected function isBatch($content_count, $comment_count) {
    return $content_count >= 50 || $comment_count >= 10;
}