You are here

public function OverviewForm::resetForm in Events Log Track 8.2

Same name and namespace in other branches
  1. 8 src/OverviewForm.php \Drupal\event_log_track\OverviewForm::resetForm()

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 233

Class

OverviewForm
Configure user settings for this site.

Namespace

Drupal\event_log_track

Code

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