public function BanDelete::submitForm

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Overrides FormInterface::submitForm

File

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

Class

BanDelete
Provides a form to unban IP addresses.

Namespace

Drupal\ban\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $this->ipManager
    ->unbanIp($this->banIp);
  watchdog('user', 'Deleted %ip', array(
    '%ip' => $this->banIp,
  ));
  drupal_set_message(t('The IP address %ip was deleted.', array(
    '%ip' => $this->banIp,
  )));
  $form_state['redirect'] = 'admin/config/people/ban';
}