You are here

function paranoia_system_info_alter in Paranoia 8

Implements hook_system_info_alter().

Hide designated modules.

File

./paranoia.module, line 25
Disables PHP block visibility permission and gives status error if a role has this permission. Disables the PHP module. Hides the PHP and paranoia modules from the modules page. Prevents user/1 editing which could give access to abitrary contrib…

Code

function paranoia_system_info_alter(array &$info, Extension $file, $type) {
  $hidden_modules = \Drupal::moduleHandler()
    ->invokeAll('paranoia_hide_modules');
  if ($type == 'module' && in_array($file
    ->getName(), $hidden_modules)) {
    $info['hidden'] = TRUE;
  }
}