You are here

function field_encrypt_entity_update in Field Encryption 8.2

Same name and namespace in other branches
  1. 3.0.x field_encrypt.module \field_encrypt_entity_update()

Implements hook_entity_update().

Encrypts the entity after being updated.

File

./field_encrypt.module, line 167
Contains module hooks for field_encrypt.

Code

function field_encrypt_entity_update(EntityInterface $entity) {
  if (field_encrypt_allow_encryption($entity)) {
    \Drupal::service('field_encrypt.encrypted_field_value_manager')
      ->saveEncryptedFieldValues($entity);
  }
}