You are here

function webform_ip_anon_alter in IP Anonymize 8

Same name and namespace in other branches
  1. 6 ip_anon.pages.inc \webform_ip_anon_alter()
  2. 7 ip_anon.inc \webform_ip_anon_alter()

Implements hook_ip_anon_alter() for webform module.

File

./ip_anon.inc, line 112
Page callbacks and utility functions for IP Anonymize module.

Code

function webform_ip_anon_alter(&$tables) {
  $tables['webform_submission'] = [
    'hostname' => 'remote_addr',
    'timestamp' => 'changed',
    'callback' => function () {
      \Drupal::entityTypeManager()
        ->getStorage('webform_submission')
        ->resetCache();
    },
  ];
}