You are here

public function DevelGenerateCommands::media in Devel 4.x

Same name and namespace in other branches
  1. 8.3 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 feedback An integer representing interval for insertion rate logging. @option skip-fields A comma delimited list of fields to omit when generating random values. @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 253

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' => NULL,
  'feedback' => 1000,
]) {
  $this
    ->generate();
}