public function OverviewForm::resetForm in Events Log Track 8
Same name and namespace in other branches
- 8.2 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 191
Class
- OverviewForm
- Configure user settings for this site.
Namespace
Drupal\event_log_trackCode
public function resetForm(array &$form, FormStateInterface $form_state) {
$form_state
->setRedirect('<current>');
$form_state
->setValues([]);
}