You are here

function data_policy_views_data_alter in Data Policy 8

Implements hook_views_data_alter().

File

./data_policy.module, line 77
data_policy.module

Code

function data_policy_views_data_alter(array &$data) {
  $plugins = [
    'data_policy_revision_id' => 'user_consent_data_policy_revision',
    'state' => 'user_consent_state',
  ];
  foreach ($plugins as $field => $plugin) {
    foreach ([
      'field',
      'filter',
    ] as $type) {
      $data['user_consent'][$field][$type]['id'] = $plugin;
    }
  }
}