You are here

protected function WebformEncryptSubmissionStorage::doPostSave in Webform Encrypt 8

Performs post save entity processing.

Parameters

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

bool $update: Specifies whether the entity is being updated or created.

Overrides WebformSubmissionStorage::doPostSave

File

src/WebformEncryptSubmissionStorage.php, line 259

Class

WebformEncryptSubmissionStorage
Alter webform submission storage definitions.

Namespace

Drupal\webform_encrypt

Code

protected function doPostSave(EntityInterface $entity, $update) {

  /** @var \Drupal\webform\WebformSubmissionInterface $entity */

  // Decrypt and set data post save so it remains readable for multistep
  // webforms and/or any other process that may take place after saving.
  $data = $this
    ->decryptElements($entity, FALSE);
  $entity
    ->setData($data);
  parent::doPostSave($entity, $update);
}