You are here

public function DevelGenerateCommands::terms in Devel 8.3

Same name and namespace in other branches
  1. 8 devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::terms()
  2. 8.2 devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::terms()
  3. 4.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::terms()

Create terms in specified vocabulary.

@command devel-generate:terms @aliases gent, devel-generate-terms @pluginId term

@option kill Delete all terms before generating new ones. @option bundles A comma-delimited list of machine names for the vocabularies where terms will be created. @option feedback An integer representing interval for insertion rate logging. @option languages A comma-separated list of language codes @option translations A comma-separated list of language codes for translations.

Parameters

int $num: Number of terms to generate.

array $options: Array of options as described below.

File

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

Class

DevelGenerateCommands
Provide Drush commands for all the Devel Generate processes.

Namespace

Drupal\devel_generate\Commands

Code

public function terms($num = 50, array $options = [
  'kill' => FALSE,
  'bundles' => NULL,
  'feedback' => 1000,
  'languages' => NULL,
  'translations' => NULL,
]) {
  $this
    ->generate();
}