flood_unblock.module in Flood Unblock 3.0.x
Same filename and directory in other branches
Contains hooks for the flood_unblock module.
File
flood_unblock.moduleView source
<?php
/**
* @file
* Contains hooks for the flood_unblock module.
*/
/**
* Implements hook_requirements().
*/
function flood_unblock_requirements($phase) {
$description = t('Flood unblock is being replaced by <a href=":url">Flood control</a>. You should uninstall and remove this module.', [
':url' => 'https://www.drupal.org/project/flood_control',
]);
$moduleHandler = \Drupal::service('module_handler');
if (!$moduleHandler
->moduleExists('flood_control')) {
$description = t('Flood unblock is being replaced by <a href=":url">Flood control</a>. You should uninstall and remove this module. If you like to continue using the Flood unblock functions, you must download and install Flood control.', [
':url' => 'https://www.drupal.org/project/flood_control',
]);
}
$requirements = [
'flood_unblock' => [
'severity' => REQUIREMENT_WARNING,
'description' => $description,
'value' => t('Flood unblock is being replaced by Flood control'),
'title' => t('Flood Unblock'),
],
];
return $requirements;
}
Functions
Name | Description |
---|---|
flood_unblock_requirements | Implements hook_requirements(). |