You are here

public function OverviewForm::resetForm in Admin Audit Trail 1.0.x

Resets all the states of the form.

This method is called when the "Reset" button is triggered. Clears user inputs and the form state.

Parameters

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

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

File

src/OverviewForm.php, line 260

Class

OverviewForm
Configure user settings for this site.

Namespace

Drupal\admin_audit_trail

Code

public function resetForm(array &$form, FormStateInterface $form_state) {
  $form_state
    ->setRedirect('<current>');
  $form_state
    ->setValues([]);
  $this->filters = [];
}