function paranoia_paranoia_hide_modules in Paranoia 8
Same name and namespace in other branches
- 7 paranoia.module \paranoia_paranoia_hide_modules()
Implements hook_paranoia_hide().
File
- ./
paranoia.module, line 206 - 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_paranoia_hide_modules() {
$hidden_modules = [
'paranoia',
];
// Disabled modules should also be hidden.
$disabled_modules = \Drupal::moduleHandler()
->invokeAll('paranoia_disable_modules');
return array_unique(array_merge($hidden_modules, $disabled_modules));
}