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)) {
    throw new NotFoundHttpException();
  }
  return parent::buildForm($form, $form_state);
}
doc_Drupal
2016-10-29 08:45:26
Comments
Leave a Comment

Please login to continue.