You are here

public function GoogleAnalyticsCounterRevokeForm::submitForm in Google Analytics Counter 8.3

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/GoogleAnalyticsCounterRevokeForm.php, line 65

Class

GoogleAnalyticsCounterRevokeForm
Class GoogleAnalyticsCounterRevokeForm.

Namespace

Drupal\google_analytics_counter\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Revoke the state values.
  GoogleAnalyticsCounterHelper::gacDeleteState();

  // Set redirect.
  $form_state
    ->setRedirectUrl($this
    ->getCancelUrl());
}