You are here

private function WebformContentCreatorEntity::getDecryptionFromProfile in Webform Content Creator 8

Same name and namespace in other branches
  1. 3.x src/Entity/WebformContentCreatorEntity.php \Drupal\webform_content_creator\Entity\WebformContentCreatorEntity::getDecryptionFromProfile()
  2. 2.x src/Entity/WebformContentCreatorEntity.php \Drupal\webform_content_creator\Entity\WebformContentCreatorEntity::getDecryptionFromProfile()

Get decrypted value with the configured encryption profile.

Parameters

string $value: Encrypted value.

string $encryptionProfile: Encryption profile name.

Return value

string Encryption profile used to encrypt/decrypt $value

1 call to WebformContentCreatorEntity::getDecryptionFromProfile()
WebformContentCreatorEntity::mapNodeField in src/Entity/WebformContentCreatorEntity.php
Use a single mapping to set a Node field value.

File

src/Entity/WebformContentCreatorEntity.php, line 299

Class

WebformContentCreatorEntity
Defines the Webform Content creator entity.

Namespace

Drupal\webform_content_creator\Entity

Code

private function getDecryptionFromProfile($value, $encryptionProfile = '') {
  if ($this
    ->getEncryptionCheck()) {
    $decValue = WebformContentCreatorUtilities::getDecryptedValue($value, $encryptionProfile);
  }
  else {
    $decValue = $value;
  }
  return $decValue;
}