You are here

public function TfaTrustedBrowser::getForm in Two-factor Authentication (TFA) 8

Get TFA process form from plugin.

Parameters

array $form: The configuration form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array Form API array.

Overrides TfaValidationInterface::getForm

File

src/Plugin/TfaLogin/TfaTrustedBrowser.php, line 74

Class

TfaTrustedBrowser
Trusted browser validation class.

Namespace

Drupal\tfa\Plugin\TfaLogin

Code

public function getForm(array $form, FormStateInterface $form_state) {
  $form['trust_browser'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Remember this browser?'),
    '#description' => $this
      ->t('Not recommended if you are on a public or shared computer.'),
  ];
  return $form;
}