You are here

protected function YamlFormSubmissionStorage::doPreSave in YAML Form 8

Performs presave entity processing.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The saved entity.

Return value

int|string The processed entity identifier.

Throws

\Drupal\Core\Entity\EntityStorageException If the entity identifier is invalid.

Overrides ContentEntityStorageBase::doPreSave

File

src/YamlFormSubmissionStorage.php, line 495

Class

YamlFormSubmissionStorage
Defines the form submission storage.

Namespace

Drupal\yamlform

Code

protected function doPreSave(EntityInterface $entity) {

  /** @var \Drupal\yamlform\YamlFormSubmissionInterface $entity */
  $id = parent::doPreSave($entity);
  $this
    ->invokeYamlFormElements('preSave', $entity);
  $this
    ->invokeYamlFormHandlers('preSave', $entity);
  return $id;
}