You are here

public function RequestHashForm::buildForm in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Form/RequestHashForm.php \Drupal\simplenews\Form\RequestHashForm::buildForm()
  2. 3.x src/Form/RequestHashForm.php \Drupal\simplenews\Form\RequestHashForm::buildForm()

Request new hash form.

Parameters

$key: The mail key to be sent.

$context: Necessary context to send the mail. Must at least include the simplenews subscriber.

Overrides ConfirmFormBase::buildForm

File

src/Form/RequestHashForm.php, line 58

Class

RequestHashForm
Provides an generic base class for a confirmation form.

Namespace

Drupal\simplenews\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $key = '', $context = array()) {
  $form = parent::buildForm($form, $form_state);
  $form_state
    ->set('key', $key);
  $form_state
    ->set('context', $context);
  return $form;
}