You are here

function gdpr_get_modules in General Data Protection Regulation 3.0.x

Returns cached module data from module info files.

Return value

array Array of module data

2 calls to gdpr_get_modules()
gdpr_get_gdpr_module_description in ./gdpr.module
Returns a HTML markup for gdpr_modules checkpoint description.
gdpr_get_module_list in ./gdpr.module
Returns a HTML markup for data_collecting modules checkpoint description.


./gdpr.module, line 451
Module file.


function gdpr_get_modules() {
  $cache = Drupal::cache()
  if (!empty($cache->data)) {
    return $cache->data;
  $modules_list_raw = Drupal::service('extension.list.module')
  $modules_list = [];
  foreach ($modules_list_raw as $module) {
      ->getName()] = [
      'status' => $module->status,
      'name' => $module->info['name'],
    ->set('modules.list', $modules_list);
  return $modules_list;