function protected_submissions_requirements in Protected Submissions 8
Same name and namespace in other branches
- 7 protected_submissions.module \protected_submissions_requirements()
Implements hook_requirements().
File
- ./
protected_submissions.install, line 22 - Installation functions for protected_submissions module.
Code
function protected_submissions_requirements($phase) {
// Provide stats for rejected submissions on the status page.
$requirements = [];
$rejected = \Drupal::state()
->get('protected_submissions.rejected');
$requirements['protected_submissions'] = [
'title' => t('Protected submissions'),
'value' => t('Total of @count submissions containing <a href="@patterns">spam patterns</a> have been rejected.', [
'@count' => $rejected,
'@patterns' => '/admin/config/content/protected_submissions',
]),
'severity' => REQUIREMENT_INFO,
];
return $requirements;
}