You are here

public function RedhenDedupeFilterForm::submitForm in RedHen CRM 8

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/redhen_dedupe/src/Form/RedhenDedupeFilterForm.php, line 79

Class

RedhenDedupeFilterForm
Form controller for Dedupe search tool.

Namespace

Drupal\redhen_dedupe\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $query = [
    'base_fields' => array_filter($form_state
      ->getValue([
      'base_fields',
    ])),
    'fields' => array_filter($form_state
      ->getValue([
      'fields',
    ])),
    'active' => $form_state
      ->getValue([
      'active',
    ]),
  ];
  $form_state
    ->setRedirect('redhen_dedupe.list_page', $query);
}