BanIpManagerInterface::unbanIp

public BanIpManagerInterface::unbanIp($id) Unbans an IP address. Parameters string $id: The IP address to unban. File core/modules/ban/src/BanIpManagerInterface.php, line 43 Class BanIpManagerInterface Provides an interface defining a BanIp manager. Namespace Drupal\ban Code public function unbanIp($id);

BanIpManagerInterface::isBanned

public BanIpManagerInterface::isBanned($ip) Returns if this IP address is banned. Parameters string $ip: The IP address to check. Return value bool TRUE if the IP address is banned, FALSE otherwise. File core/modules/ban/src/BanIpManagerInterface.php, line 19 Class BanIpManagerInterface Provides an interface defining a BanIp manager. Namespace Drupal\ban Code public function isBanned($ip);

BanIpManagerInterface

Provides an interface defining a BanIp manager. Hierarchy interface \Drupal\ban\BanIpManagerInterface File core/modules/ban/src/BanIpManagerInterface.php, line 8 Namespace Drupal\ban Members Name Modifiers Type Description BanIpManagerInterface::banIp public function Bans an IP address. BanIpManagerInterface::findAll public function Finds all banned IP addresses. BanIpManagerInterface::findById public function Finds a banned IP address by its ID. BanIpM

BanIpManager::findById

public BanIpManager::findById($ban_id) Finds a banned IP address by its ID. Parameters int $ban_id: The ID for a banned IP address. Return value string|false Either the banned IP address or FALSE if none exist with that ID. Overrides BanIpManagerInterface::findById File core/modules/ban/src/BanIpManager.php, line 65 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function findById($ban_id) { return $this->connection->query("SELECT ip FROM {ban_ip} WHERE ii

BanIpManager::unbanIp

public BanIpManager::unbanIp($id) Unbans an IP address. Parameters string $id: The IP address to unban. Overrides BanIpManagerInterface::unbanIp File core/modules/ban/src/BanIpManager.php, line 56 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function unbanIp($id) { $this->connection->delete('ban_ip') ->condition('ip', $id) ->execute(); }

BanIpManager::isBanned

public BanIpManager::isBanned($ip) Returns if this IP address is banned. Parameters string $ip: The IP address to check. Return value bool TRUE if the IP address is banned, FALSE otherwise. Overrides BanIpManagerInterface::isBanned File core/modules/ban/src/BanIpManager.php, line 32 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function isBanned($ip) { return (bool) $this->connection->query("SELECT * FROM {ban_ip} WHERE ip = :ip", array(':ip' => $ip))

BanIpManager::__construct

public BanIpManager::__construct(Connection $connection) Construct the BanSubscriber. Parameters \Drupal\Core\Database\Connection $connection: The database connection which will be used to check the IP against. File core/modules/ban/src/BanIpManager.php, line 25 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function __construct(Connection $connection) { $this->connection = $connection; }

BanIpManager::banIp

public BanIpManager::banIp($ip) Bans an IP address. Parameters string $ip: The IP address to ban. Overrides BanIpManagerInterface::banIp File core/modules/ban/src/BanIpManager.php, line 46 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code public function banIp($ip) { $this->connection->merge('ban_ip') ->key(array('ip' => $ip)) ->fields(array('ip' => $ip)) ->execute(); }

BanIpManager::$connection

The database connection used to check the IP against. Type: \Drupal\Core\Database\Connection File core/modules/ban/src/BanIpManager.php, line 17 Class BanIpManager Ban IP manager. Namespace Drupal\ban Code protected $connection;

BanDelete::submitForm

public BanDelete::submitForm(array &$form, FormStateInterface $form_state) Form submission handler. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Overrides FormInterface::submitForm File core/modules/ban/src/Form/BanDelete.php, line 94 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function submitForm(array &$form,