public function WebformSubmissionStorage::create in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformSubmissionStorage.php \Drupal\webform\WebformSubmissionStorage::create()
Constructs a new entity object, without permanently saving it.
Parameters
array $values: (optional) An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
Return value
\Drupal\Core\Entity\EntityInterface A new entity object.
Overrides EntityStorageBase::create
File
- src/
WebformSubmissionStorage.php, line 925
Class
- WebformSubmissionStorage
- Defines the webform submission storage.
Namespace
Drupal\webformCode
public function create(array $values = []) {
/** @var \Drupal\webform\WebformSubmissionInterface $entity */
// Pre create is called via the WebformSubmission entity.
// @see: \Drupal\webform\Entity\WebformSubmission::preCreate
$entity = parent::create($values);
$this
->invokeWebformElements('postCreate', $entity);
$this
->invokeWebformHandlers('postCreate', $entity);
return $entity;
}