You are here

public function DisclaimerEmailMatchForm::submitForm in Disclaimer 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

src/Form/DisclaimerEmailMatchForm.php, line 132

Class

DisclaimerEmailMatchForm
Class DisclaimerEmailMatchForm.

Namespace

Drupal\disclaimer\Form

Code

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

  // Save the success in cookie.
  setcookie('disclaimer_email_' . Html::escape($this->blockSettings['machine_name']), 1, time() + $this->blockSettings['max_age']);

  // @ToDo: Dispatch an Event to offer the e-mail to other modules.
}