BanIpManager

Ban IP manager. Hierarchy class \Drupal\ban\BanIpManager implements BanIpManagerInterface File core/modules/ban/src/BanIpManager.php, line 10 Namespace Drupal\ban Members Name Modifiers Type Description BanIpManager::$connection protected property The database connection used to check the IP against. BanIpManager::banIp public function Bans an IP address. Overrides BanIpManagerInterface::banIp BanIpManager::findAll public function Finds all banned IP addr

BanDelete::__construct

public BanDelete::__construct(BanIpManagerInterface $ip_manager) Constructs a new BanDelete object. Parameters \Drupal\ban\BanIpManagerInterface $ip_manager: The IP manager. File core/modules/ban/src/Form/BanDelete.php, line 37 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function __construct(BanIpManagerInterface $ip_manager) { $this->ipManager = $ip_manager; }

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,

BanDelete::getQuestion

public BanDelete::getQuestion() Returns the question to ask the user. Return value string The form question. The page title will be set to this value. Overrides ConfirmFormInterface::getQuestion File core/modules/ban/src/Form/BanDelete.php, line 60 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function getQuestion() { return $this->t('Are you sure you want to unblock %ip?', array('%ip' => $this->banIp)); }

BanDelete::getFormId

public BanDelete::getFormId() Returns a unique string identifying the form. Return value string The unique string identifying the form. Overrides FormInterface::getFormId File core/modules/ban/src/Form/BanDelete.php, line 53 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function getFormId() { return 'ban_ip_delete_form'; }

BanDelete::getConfirmText

public BanDelete::getConfirmText() Returns a caption for the button that confirms the action. Return value string The form confirmation text. Overrides ConfirmFormBase::getConfirmText File core/modules/ban/src/Form/BanDelete.php, line 67 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function getConfirmText() { return $this->t('Delete'); }

BanDelete::getCancelUrl

public BanDelete::getCancelUrl() Returns the route to go to if the user cancels the action. Return value \Drupal\Core\Url A URL object. Overrides ConfirmFormInterface::getCancelUrl File core/modules/ban/src/Form/BanDelete.php, line 74 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function getCancelUrl() { return new Url('ban.admin_page'); }

BanDelete::create

public static BanDelete::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The service contai

BanDelete::buildForm

public BanDelete::buildForm(array $form, FormStateInterface $form_state, $ban_id = '') Parameters string $ban_id: The IP address record ID to unban. Overrides ConfirmFormBase::buildForm File core/modules/ban/src/Form/BanDelete.php, line 84 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code public function buildForm(array $form, FormStateInterface $form_state, $ban_id = '') { if (!$this->banIp = $this->ipManager->findById($ban_id)) { th

BanDelete::$ipManager

The IP manager. Type: \Drupal\ban\BanIpManagerInterface File core/modules/ban/src/Form/BanDelete.php, line 29 Class BanDelete Provides a form to unban IP addresses. Namespace Drupal\ban\Form Code protected $ipManager;