function DevelGenerateCommands::terms

Same name in other branches
  1. 5.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::terms()
  2. 5.x devel_generate/src/Drush/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Drush\Commands\DevelGenerateCommands::terms()

Create terms in specified vocabulary.

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

@option kill Delete all terms in these vocabularies 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. @option min-depth The minimum depth of hierarchy for the new terms. @option max-depth The maximum depth of hierarchy for the new terms.

Parameters

int $num: Number of terms to generate.

array $options: Array of options as described below.

File

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

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,
    'min-depth' => '1',
    'max-depth' => '4',
]) {
    $this->generate();
}