function paranoia_requirements in Paranoia 8
Same name and namespace in other branches
- 6 paranoia.module \paranoia_requirements()
- 7 paranoia.install \paranoia_requirements()
Implements hook_requirements().
File
- ./
paranoia.install, line 33 - Disable risky modules & set install message for Paranoia.
Code
function paranoia_requirements($phase) {
$requirements = [];
if ($phase == 'runtime') {
// Ensure the PHP module is not enabled.
if (\Drupal::moduleHandler()
->moduleExists('php')) {
$requirements['paranoia_php'] = [
'title' => t('Paranoia'),
'description' => t('The PHP module is enabled. This module should be disabled (but paranoia module prevents it from showing in the module admin form). It may have been enabled in the database, circumventing the effectiveness of paranoia module.'),
'severity' => REQUIREMENT_ERROR,
'value' => '',
];
}
}
return $requirements;
}