function spamicide_requirements in Spamicide 8
Same name and namespace in other branches
- 5 spamicide.module \spamicide_requirements()
- 6 spamicide.install \spamicide_requirements()
- 7 spamicide.install \spamicide_requirements()
Implements hook_requirements().
File
- ./
spamicide.install, line 46 - This module provides yet another tool to eliminate spam.
Code
function spamicide_requirements($phase) {
$requirements = [];
$spamicide = \Drupal::configFactory()
->get('spamicide.settings');
if ($phase == 'runtime' || $phase == 'install') {
if ($spamicide
->get('spamicide_log_attempts')) {
$requirements['spamicide_attempt_counter'] = [
'title' => t('Spamicide'),
'value' => t('Already blocked @counter form submissions', [
'@counter' => $spamicide
->get('spamicide_counter'),
]),
'severity' => REQUIREMENT_INFO,
];
}
}
return $requirements;
}