function DevelGenerateCommands::media

Same name in this branch
  1. 5.x devel_generate/src/Drush/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Drush\Commands\DevelGenerateCommands::media()
Same name in other branches
  1. 4.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::media()

Create media items.

@command devel-generate:media @aliases genmd, devel-generate-media @pluginId media @validate-module-enabled media

@option kill Delete all media items before generating new media. @option media-types A comma-delimited list of media types to create. @option skip-fields A comma delimited list of fields to omit when generating random values @option base-fields A comma delimited list of base field names to populate @option feedback An integer representing interval for insertion rate logging. @option languages A comma-separated list of language codes

Parameters

int $num: Number of media items to generate.

array $options: Array of options as described below.

File

devel_generate/src/Commands/DevelGenerateCommands.php, line 255

Class

DevelGenerateCommands
Provide Drush commands for all the Devel Generate processes.

Namespace

Drupal\devel_generate\Commands

Code

public function media($num = 50, array $options = [
    'kill' => FALSE,
    'media-types' => self::REQ,
    'feedback' => 1000,
    'skip-fields' => self::REQ,
    'base-fields' => self::REQ,
]) {
    $this->generate();
}