public function BanDelete::buildForm

Parameters

string $ban_id: The IP address record ID to unban.

Overrides ConfirmFormBase::buildForm

File

drupal/core/modules/ban/lib/Drupal/ban/Form/BanDelete.php, line 80
Contains \Drupal\ban\Form\BanDelete.

Class

BanDelete
Provides a form to unban IP addresses.

Namespace

Drupal\ban\Form

Code

public function buildForm(array $form, array &$form_state, $ban_id = '') {
  if (!($this->banIp = $this->ipManager
    ->findById($ban_id))) {
    throw new NotFoundHttpException();
  }
  return parent::buildForm($form, $form_state);
}