You are here

public static function AutobanBatch::ipBanFinished in Automatic IP ban (Autoban) 8

IP ban finished.

File

src/AutobanBatch.php, line 43
Contains \Drupal\autoban\AutobanBatch.

Class

AutobanBatch
Class AutobanBatch.

Namespace

Drupal\autoban

Code

public static function ipBanFinished($success, $results, $operations) {
  if ($success) {
    $message = t('IP bans was finished. Total banned: %results', [
      '%results' => $results,
    ]);
    \Drupal::messenger()
      ->addMessage($message);
    \Drupal::service('logger.factory')
      ->get('autoban')
      ->notice($message);
  }
}