You are here

public function ProfilesFilterForm::submitForm in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Form/ProfilesFilterForm.php \Drupal\webprofiler\Form\ProfilesFilterForm::submitForm()
  2. 8 webprofiler/src/Form/ProfilesFilterForm.php \Drupal\webprofiler\Form\ProfilesFilterForm::submitForm()
  3. 4.x webprofiler/src/Form/ProfilesFilterForm.php \Drupal\webprofiler\Form\ProfilesFilterForm::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

webprofiler/src/Form/ProfilesFilterForm.php, line 69

Class

ProfilesFilterForm
Class ProfilesFilterForm

Namespace

Drupal\webprofiler\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $ip = $form_state
    ->getValue('ip');

  // ['values']['ip'];
  $url = $form_state
    ->getValue('url');
  $method = $form_state
    ->getValue('method');
  $limit = $form_state
    ->getValue('limit');
  $url = new Url('webprofiler.admin_list', [], [
    'query' => [
      'ip' => $ip,
      'url' => $url,
      'method' => $method,
      'limit' => $limit,
    ],
  ]);
  $form_state
    ->setRedirectUrl($url);
}