You are here

function field_encrypt_entity_view in Field Encryption 3.0.x

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

Implements hook_entity_view().

File

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

Code

function field_encrypt_entity_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
  if (field_encrypt_has_encrypted_fields($entity) && \Drupal::config('field_encrypt.settings')
    ->get('make_entities_uncacheable')) {
    \Drupal::service('field_encrypt.process_entities')
      ->entitySetCacheTags($entity, $build);
  }
}