You are here

function webform_encrypt_entity_type_alter in Webform Encrypt 8

Implements hook_entity_type_alter().

File

./webform_encrypt.module, line 43
Main module file for the Webform Encrypt module.

Code

function webform_encrypt_entity_type_alter(array &$entity_types) {

  /* @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
  if (isset($entity_types['webform_submission'])) {
    $entity_types['webform_submission']
      ->setStorageClass('Drupal\\webform_encrypt\\WebformEncryptSubmissionStorage');
    $entity_types['webform_submission']
      ->setAccessClass('Drupal\\webform_encrypt\\WebformEncryptSubmissionAccessControlHandler');
  }
}