You are here

public function MasqueradeForm::submitForm in Masquerade 8.2

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

src/Form/MasqueradeForm.php, line 112

Class

MasqueradeForm
Form builder for the masquerade form.

Namespace

Drupal\masquerade\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->masquerade
    ->switchTo($form_state
    ->getValue('masquerade_target_account'));
}