public function WebformSubmissionDevelGenerateTrait::__construct in Webform 8.5
Constructs a WebformSubmissionDevelGenerate object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\Database\Connection $database: The database.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.
\Drupal\webform\WebformSubmissionGenerateInterface $webform_submission_generate: The webform submission generator.
\Drupal\webform\WebformEntityReferenceManagerInterface $webform_entity_reference_manager: The webform entity reference manager.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
File
- src/
Plugin/ DevelGenerate/ WebformSubmissionDevelGenerateTrait.php, line 118
Class
- WebformSubmissionDevelGenerateTrait
- Provides a WebformSubmissionDevelGenerate trait.
Namespace
Drupal\webform\Plugin\DevelGenerateCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, RequestStack $request_stack, Connection $database, EntityTypeManagerInterface $entity_type_manager, MessengerInterface $messenger, WebformSubmissionGenerateInterface $webform_submission_generate, WebformEntityReferenceManagerInterface $webform_entity_reference_manager, TimeInterface $time) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->request = $request_stack
->getCurrentRequest();
$this->database = $database;
$this->entityTypeManager = $entity_type_manager;
$this->messenger = $messenger;
$this->webformSubmissionGenerate = $webform_submission_generate;
$this->webformEntityReferenceManager = $webform_entity_reference_manager;
$this->webformStorage = $entity_type_manager
->getStorage('webform');
$this->webformSubmissionStorage = $entity_type_manager
->getStorage('webform_submission');
$this->time = $time;
}