function field_encrypt_entity_storage_load in Field Encryption 3.0.x
Same name and namespace in other branches
- 8.2 field_encrypt.module \field_encrypt_entity_storage_load()
Implements hook_entity_storage_load().
Decrypt entity fields when loading entities.
File
- ./
field_encrypt.module, line 161 - Contains module hooks for field_encrypt.
Code
function field_encrypt_entity_storage_load($entities, $entity_type) {
if (!field_encrypt_has_encrypted_fields(current($entities))) {
return;
}
/** @var \Drupal\field_encrypt\ProcessEntities $field_encrypt_process_entities */
$field_encrypt_process_entities = \Drupal::service('field_encrypt.process_entities');
foreach ($entities as $entity) {
$field_encrypt_process_entities
->decryptEntity($entity);
}
}