TranslateFilterForm::submitForm

public TranslateFilterForm::submitForm(array &$form, FormStateInterface $form_state)

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 82

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');
}
doc_Drupal
2016-10-29 09:49:10
Comments
Leave a Comment

Please login to continue.