You are here

flood_unblock.module in Flood Unblock 3.0.x

Same filename and directory in other branches
  1. 8.2 flood_unblock.module
  2. 8 flood_unblock.module
  3. 7 flood_unblock.module

Contains hooks for the flood_unblock module.

File

flood_unblock.module
View 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