interface BanIpManagerInterface
Same name in other branches
- 9 core/modules/ban/src/BanIpManagerInterface.php \Drupal\ban\BanIpManagerInterface
- 8.9.x core/modules/ban/src/BanIpManagerInterface.php \Drupal\ban\BanIpManagerInterface
- 11.x core/modules/ban/src/BanIpManagerInterface.php \Drupal\ban\BanIpManagerInterface
Provides an interface defining a BanIp manager.
Hierarchy
- interface \Drupal\ban\BanIpManagerInterface
Expanded class hierarchy of BanIpManagerInterface
All classes that implement BanIpManagerInterface
5 files declare their use of BanIpManagerInterface
- BanAdmin.php in core/
modules/ ban/ src/ Form/ BanAdmin.php - BanAdminTest.php in core/
modules/ ban/ tests/ src/ Unit/ BanAdminTest.php - BanDelete.php in core/
modules/ ban/ src/ Form/ BanDelete.php - BanIpTest.php in core/
modules/ ban/ tests/ src/ Kernel/ BanIpTest.php - BlockedIp.php in core/
modules/ ban/ src/ Plugin/ migrate/ destination/ BlockedIp.php
File
-
core/
modules/ ban/ src/ BanIpManagerInterface.php, line 8
Namespace
Drupal\banView source
interface BanIpManagerInterface {
/**
* Returns if this IP address is banned.
*
* @param string $ip
* The IP address to check.
*
* @return bool
* TRUE if the IP address is banned, FALSE otherwise.
*/
public function isBanned($ip);
/**
* Finds all banned IP addresses.
*
* @return \Drupal\Core\Database\StatementInterface
* The result of the database query.
*/
public function findAll();
/**
* Bans an IP address.
*
* @param string $ip
* The IP address to ban.
*/
public function banIp($ip);
/**
* Removes the ban of an IP address.
*
* @param string $id
* The IP address to unban.
*/
public function unbanIp($id);
/**
* Finds a banned IP address by its ID.
*
* @param int $ban_id
* The ID for a banned IP address.
*
* @return string|false
* Either the banned IP address or FALSE if none exist with that ID.
*/
public function findById($ban_id);
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
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. |
BanIpManagerInterface::isBanned | public | function | Returns if this IP address is banned. |
BanIpManagerInterface::unbanIp | public | function | Removes the ban of an IP address. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.