You are here

function field_encrypt_entity_base_field_info in Field Encryption 3.0.x

Implements hook_entity_base_field_info().

File

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

Code

function field_encrypt_entity_base_field_info(EntityTypeInterface $entity_type) {
  $encrypted_types = \Drupal::state()
    ->get('field_encrypt.entity_types');
  if (isset($encrypted_types[$entity_type
    ->id()])) {
    $fields[ProcessEntities::ENCRYPTED_FIELD_STORAGE_NAME] = StateManager::getEncryptedFieldStorageDefinition();
    return $fields;
  }
}