You are here

public function GdprFieldFilterForm::submitForm in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/gdpr_fields/src/Form/GdprFieldFilterForm.php \Drupal\gdpr_fields\Form\GdprFieldFilterForm::submitForm()
  2. 3.0.x modules/gdpr_fields/src/Form/GdprFieldFilterForm.php \Drupal\gdpr_fields\Form\GdprFieldFilterForm::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

modules/gdpr_fields/src/Form/GdprFieldFilterForm.php, line 123

Class

GdprFieldFilterForm
Filter form for GDPR field list page.

Namespace

Drupal\gdpr_fields\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $arguments = [
    'search' => $form_state
      ->getValue('search'),
    'entity_type' => $form_state
      ->getValue('entity_type'),
    'rta' => $form_state
      ->getValue('rta'),
    'rtf' => $form_state
      ->getValue('rtf'),
    'empty' => $form_state
      ->getValue('empty'),
  ];
  $form_state
    ->setRedirect('gdpr_fields.fields_list', [], [
    'query' => $arguments,
  ]);
}