You are here

public function TranslateFilterForm::submitForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/Form/TranslateFilterForm.php \Drupal\locale\Form\TranslateFilterForm::submitForm()

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

core/modules/locale/src/Form/TranslateFilterForm.php, line 87
Contains \Drupal\locale\Form\TranslateFilterForm.

Class

TranslateFilterForm
Provides a filtered translation edit form.

Namespace

Drupal\locale\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $filters = $this
    ->translateFilters();
  foreach ($filters as $name => $filter) {
    if ($form_state
      ->hasValue($name)) {
      $_SESSION['locale_translate_filter'][$name] = $form_state
        ->getValue($name);
    }
  }
  $form_state
    ->setRedirect('locale.translate_page');
}