You are here

private function WebformContentCreatorEntity::getDecryptionFromProfile in Webform Content Creator 3.x

Same name and namespace in other branches
  1. 8 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 $profile: 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 298

Class

WebformContentCreatorEntity
Defines the Webform Content creator entity.

Namespace

Drupal\webform_content_creator\Entity

Code

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