function DevelGenerateCommands::content
Same name in other branches
- 4.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::content()
- 5.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::content()
- 5.x devel_generate/src/Drush/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Drush\Commands\DevelGenerateCommands::content()
Create content.
@command devel-generate-content @pluginId content
@option kill Delete all content before generating new content. @option types A comma delimited list of content types to create. Defaults to page,article. @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 @aliases genc @validate-module-enabled node
Parameters
$num Number of nodes to generate.:
$max_comments Maximum number of comments to generate.:
File
-
devel_generate/
src/ Commands/ DevelGenerateCommands.php, line 165
Class
- DevelGenerateCommands
- For commands that are parts of modules, Drush expects to find commandfiles in __MODULE__/src/Commands, and the namespace is Drupal/__MODULE__/Commands.
Namespace
Drupal\devel_generate\CommandsCode
public function content($num = 50, $max_comments = 0, $options = [
'kill' => FALSE,
'types' => 'page,article',
'feedback' => 1000,
]) {
$this->generate();
drush_backend_batch_process();
}