function BanDelete::buildForm
Same name in other branches
- 9 core/modules/ban/src/Form/BanDelete.php \Drupal\ban\Form\BanDelete::buildForm()
- 10 core/modules/ban/src/Form/BanDelete.php \Drupal\ban\Form\BanDelete::buildForm()
- 11.x core/modules/ban/src/Form/BanDelete.php \Drupal\ban\Form\BanDelete::buildForm()
Parameters
string $ban_id: The IP address record ID to unban.
Overrides ConfirmFormBase::buildForm
File
-
core/
modules/ ban/ src/ Form/ BanDelete.php, line 86
Class
- BanDelete
- Provides a form to unban IP addresses.
Namespace
Drupal\ban\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $ban_id = '') {
if (!($this->banIp = $this->ipManager
->findById($ban_id))) {
throw new NotFoundHttpException();
}
return parent::buildForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.