function DevelGenerateCommands::content
Same name in other branches
- 8.x-1.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 @aliases genc, devel-generate-content @pluginId content @validate-module-enabled node
@option kill Delete all content before generating new content. @option bundles A comma-delimited list of content types to create. @option authors A comma delimited list of authors ids. Defaults to all users. @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 @option translations A comma-separated list of language codes for translations. @option add-type-label Add the content type label to the front of the node title
Parameters
int $num: Number of nodes to generate.
int $max_comments: Maximum number of comments to generate.
array $options: Array of options as described below.
File
-
devel_generate/
src/ Commands/ DevelGenerateCommands.php, line 230
Class
- DevelGenerateCommands
- Provide Drush commands for all the Devel Generate processes.
Namespace
Drupal\devel_generate\CommandsCode
public function content($num = 50, $max_comments = 0, array $options = [
'kill' => FALSE,
'bundles' => 'page,article',
'authors' => NULL,
'feedback' => 1000,
'languages' => NULL,
'translations' => NULL,
'add-type-label' => FALSE,
]) {
$this->generate();
}