function DevelGenerateCommands::terms

Create terms in specified vocabulary.

Attributes

#[CLI\Command(name: self::TERMS, aliases: [ 'gent', 'devel-generate-terms', ])] #[CLI\Argument(name: 'num', description: 'Number of terms to generate.')] #[CLI\Option(name: 'kill', description: 'Delete all terms in these vocabularies before generating new ones.')] #[CLI\Option(name: 'bundles', description: 'A comma-delimited list of machine names for the vocabularies where terms will be created.')] #[CLI\Option(name: 'feedback', description: 'An integer representing interval for insertion rate logging.')] #[CLI\Option(name: 'languages', description: 'A comma-separated list of language codes')] #[CLI\Option(name: 'translations', description: 'A comma-separated list of language codes for translations.')] #[CLI\Option(name: 'min-depth', description: 'The minimum depth of hierarchy for the new terms.')] #[CLI\Option(name: 'max-depth', description: 'The maximum depth of hierarchy for the new terms.')] #[Generator(id: 'term')]

File

devel_generate/src/Drush/Commands/DevelGenerateCommands.php, line 136

Class

DevelGenerateCommands
Provide Drush commands for all the core Devel Generate plugins.

Namespace

Drupal\devel_generate\Drush\Commands

Code

public function terms(?string $num = '50', array $options = [
  'kill' => FALSE,
  'bundles' => self::REQ,
  'feedback' => '1000',
  'languages' => self::REQ,
  'translations' => self::REQ,
  'min-depth' => '1',
  'max-depth' => '4',
]) : void {
  $this->generate();
}