You are here

public function FloodUnblockAdminForm::submitForm in Flood control 2.0.x

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

src/Form/FloodUnblockAdminForm.php, line 232

Class

FloodUnblockAdminForm
Admin form of Flood Unblock.

Namespace

Drupal\flood_control\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  foreach ($form_state
    ->getValue('table') as $fid) {
    if ($fid !== 0) {
      $this->floodUnblockManager
        ->floodUnblockClearEvent($fid);
    }
  }
  $form_state
    ->setRebuild();
}