function TranslateFilterForm::resetForm

Same name in other branches
  1. 8.9.x core/modules/locale/src/Form/TranslateFilterForm.php \Drupal\locale\Form\TranslateFilterForm::resetForm()
  2. 10 core/modules/locale/src/Form/TranslateFilterForm.php \Drupal\locale\Form\TranslateFilterForm::resetForm()
  3. 11.x core/modules/locale/src/Form/TranslateFilterForm.php \Drupal\locale\Form\TranslateFilterForm::resetForm()

Provides a submit handler for the reset button.

File

core/modules/locale/src/Form/TranslateFilterForm.php, line 100

Class

TranslateFilterForm
Provides a filtered translation edit form.

Namespace

Drupal\locale\Form

Code

public function resetForm(array &$form, FormStateInterface $form_state) {
    $this->getRequest()
        ->getSession()
        ->remove('locale_translate_filter');
    $form_state->setRedirect('locale.translate_page');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.