You are here

AdvbanProvider.php in Automatic IP ban (Autoban) 8

File

modules/autoban_advban/src/AdvbanProvider.php
View source
<?php

namespace Drupal\autoban_advban;

use Drupal\autoban\AutobanProviderInterface;
use Drupal\advban\AdvbanIpManager;
use Drupal\Core\Database\Connection;

/**
 * IP manager class for core Ban module.
 */
class AdvbanProvider implements AutobanProviderInterface {

  /**
   * {@inheritdoc}
   */
  public function getId() {
    return 'advban';
  }

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return 'Advanced Ban';
  }

  /**
   * {@inheritdoc}
   */
  public function getBanType() {
    return 'single';
  }

  /**
   * {@inheritdoc}
   */
  public function getBanIpManager(Connection $connection) {
    return \Drupal::service('advban.ip_manager');
  }

}

Classes

Namesort descending Description
AdvbanProvider IP manager class for core Ban module.