function MediaDevelGenerate::isBatch

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

Finds out if the media item generation will run in batch process.

Parameters

int $media_items_count: Number of media items to be generated.

Return value

bool If the process should be a batch process.

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

File

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

Class

MediaDevelGenerate
Provides a plugin that generates media entities.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

protected function isBatch(int $media_items_count) : bool {
    return $media_items_count >= 50;
}