You are here

public function WebformCommands::drush_webform_generate in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Commands/WebformCommands.php \Drupal\webform\Commands\WebformCommands::drush_webform_generate()

Create submissions in specified webform.

@command webform:generate

@option kill Delete all submissions in specified webform before generating. @option feedback An integer representing interval for insertion rate logging. Defaults to 1000 @option entity-type The entity type to which this submission was submitted from. @option entity-id The ID of the entity of which this webform submission was submitted from. @aliases wfg,webform-generate

Parameters

$webform_id Webform id into which new submissions will be inserted.:

$num Number of submissions to insert. Defaults to 50.:

File

src/Commands/WebformCommands.php, line 247

Class

WebformCommands
Webform commands for Drush 9.x.

Namespace

Drupal\webform\Commands

Code

public function drush_webform_generate($webform_id = NULL, $num = NULL, array $options = [
  'kill' => FALSE,
  'feedback' => NULL,
  'entity-type' => NULL,
  'entity-id' => NULL,
]) {
  $this->cliService
    ->drush_webform_generate($webform_id, $num);
}