You are here

function _get_module_list_by_type in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 gdpr.module \_get_module_list_by_type()
  2. 7 gdpr.module \_get_module_list_by_type()

Returns array of module machine_names by type.

Parameters

string $type: The type of modules to search for.

Return value

array Array of module machine_names

1 call to _get_module_list_by_type()
_get_module_list in ./gdpr.module
Returns a HTML markup for data_collecting modules checkpoint description.

File

./gdpr.module, line 399
Module file.

Code

function _get_module_list_by_type($type) {
  $list = [];
  switch ($type) {
    case 'collect':
      $list = [
        'contact',
        'webform',
        'geoip',
      ];
      break;
    case 'tracking':
      $list = [
        'google_analytics',
        'google_tag',
        'piwik',
        'hotjar',
        'recaptcha',
        'site_verify',
        'adsense',
        'yandex_metrics',
      ];
      break;
    case 'social':
      $list = [
        'oauth',
        'sharethis',
        'addtoany',
        'cas',
        'fb_likebox',
        'easy_social',
      ];
      break;
  }
  return $list;
}