You are here

function field_encrypt_entity_insert in Field Encryption 3.0.x

Same name and namespace in other branches
  1. 8.2 field_encrypt.module \field_encrypt_entity_insert()

Implements hook_entity_insert().

File

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

Code

function field_encrypt_entity_insert(EntityInterface $entity) {
  if (!_field_encrypt_can_eval() && field_encrypt_has_encrypted_fields($entity)) {
    \Drupal::service('field_encrypt.process_entities')
      ->decryptEntity($entity);
  }
}