You are here

class WebformSubmissionDevelGenerate in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/DevelGenerate/WebformSubmissionDevelGenerate.php \Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerate

Provides a WebformSubmissionDevelGenerate plugin.

Plugin annotation


@DevelGenerate(
  id = "webform_submission",
  label = @Translation("Webform submissions"),
  description = @Translation("Generate a given number of webform submissions. Optionally delete current submissions."),
  url = "webform",
  permission = "administer webform",
  settings = {
    "num" = 50,
    "kill" = FALSE,
    "entity-type" = NULL,
    "entity-id" = NULL,
  }
)

Hierarchy

Expanded class hierarchy of WebformSubmissionDevelGenerate

File

src/Plugin/DevelGenerate/WebformSubmissionDevelGenerate.php, line 25

Namespace

Drupal\webform\Plugin\DevelGenerate
View source
class WebformSubmissionDevelGenerate extends DevelGenerateBase implements ContainerFactoryPluginInterface {
  use WebformSubmissionDevelGenerateTrait;

  /**
   * {@inheritdoc}
   */
  public function validateDrushParams(array $args, array $options = []) {
    return $this
      ->_validateDrushParams($args, $options);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DependencySerializationTrait::$_entityStorages protected property
DependencySerializationTrait::$_serviceIds protected property
DependencySerializationTrait::__sleep public function 2
DependencySerializationTrait::__wakeup public function 2
DevelGenerateBase::$random protected property The random data generator.
DevelGenerateBase::$settings protected property The plugin settings.
DevelGenerateBase::generate public function Execute the instructions in common for all DevelGenerate plugin. Overrides DevelGenerateBaseInterface::generate
DevelGenerateBase::getDefaultSettings public function Returns the default settings for the plugin. Overrides DevelGenerateBaseInterface::getDefaultSettings
DevelGenerateBase::getEntityTypeManager protected function Gets the entity type manager service.
DevelGenerateBase::getLangcode protected function Return a language code. 1
DevelGenerateBase::getLanguageForm protected function Creates the language and translation section of the form.
DevelGenerateBase::getRandom protected function Returns the random data generator.
DevelGenerateBase::getSetting public function Returns the array of settings, including defaults for missing settings. Overrides DevelGenerateBaseInterface::getSetting
DevelGenerateBase::getSettings public function Returns the current settings for the plugin. Overrides DevelGenerateBaseInterface::getSettings
DevelGenerateBase::handleDrushParams public function
DevelGenerateBase::isNumber public static function Check if a given param is a number.
DevelGenerateBase::populateFields public static function Populate the fields on a given entity with sample values.
DevelGenerateBase::randomSentenceOfLength protected function Generates a random sentence of specific length.
DevelGenerateBase::setMessage protected function Set a message for either drush or the web interface.
DevelGenerateBase::settingsFormValidate public function Form validation handler. Overrides DevelGenerateBaseInterface::settingsFormValidate 2
MessengerTrait::messenger public function Gets the messenger. 27
MessengerTrait::setMessenger public function Sets the messenger.
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 98
StringTranslationTrait::$stringTranslation protected property The string translation service. 4
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
WebformEntityStorageTrait::$entityStorageToTypeMappings protected property An associate array of entity type storage aliases.
WebformEntityStorageTrait::getEntityStorage protected function Retrieves the entity storage.
WebformEntityStorageTrait::getSubmissionStorage protected function Retrieves the webform submission storage.
WebformEntityStorageTrait::getWebformStorage protected function Retrieves the webform storage.
WebformEntityStorageTrait::__get public function Implements the magic __get() method.
WebformSubmissionDevelGenerate::validateDrushParams public function Responsible for validating Drush params. Overrides DevelGenerateBaseInterface::validateDrushParams
WebformSubmissionDevelGenerateTrait::$database protected property The database object.
WebformSubmissionDevelGenerateTrait::$entityTypeManager protected property The entity type manager. Overrides WebformEntityStorageTrait::$entityTypeManager
WebformSubmissionDevelGenerateTrait::$generatingSubmissions protected static property Track in webform submission are being generated.
WebformSubmissionDevelGenerateTrait::$messenger protected property The messenger.
WebformSubmissionDevelGenerateTrait::$request protected property The current request.
WebformSubmissionDevelGenerateTrait::$time protected property The time service.
WebformSubmissionDevelGenerateTrait::$webformEntityReferenceManager protected property The webform entity reference manager.
WebformSubmissionDevelGenerateTrait::$webformSubmissionGenerate protected property The webform submission generation service.
WebformSubmissionDevelGenerateTrait::create public static function
WebformSubmissionDevelGenerateTrait::deleteWebformSubmissions protected function Deletes all submissions of given webforms.
WebformSubmissionDevelGenerateTrait::generateElements public function
WebformSubmissionDevelGenerateTrait::generateSubmission protected function Create one node. Used by both batch and non-batch code branches.
WebformSubmissionDevelGenerateTrait::generateSubmissions protected function Generates submissions for a list of given webforms.
WebformSubmissionDevelGenerateTrait::getUsers protected function Retrieve 50 uids from the database.
WebformSubmissionDevelGenerateTrait::initializeGenerate protected function Add 'users' that contains a list of uids.
WebformSubmissionDevelGenerateTrait::isGeneratingSubmissions public static function Track if webform submissions are being generated.
WebformSubmissionDevelGenerateTrait::settingsForm public function
WebformSubmissionDevelGenerateTrait::validateEntity protected function Validate webform source entity type and id.
WebformSubmissionDevelGenerateTrait::validateForm public function Custom validation handler.
WebformSubmissionDevelGenerateTrait::_validateDrushParams public function