public function TfaTestTotp::getForm in Two-factor Authentication (TFA) 7.2
Get TFA process form from plugin.
Parameters
array $form: The form array structure.
array $form_state: The current form state array.
Return value
array Form API array.
Overrides TfaValidationPluginInterface::getForm
File
- tests/
includes/ tfa_test.totp.inc, line 30 - Tests for the TfaValidationPluginInterface.
Class
- TfaTestTotp
- Class TfaTestTotp.
Code
public function getForm(array $form, array &$form_state) {
$form['code'] = array(
'#type' => 'textfield',
'#title' => t('TOTP code'),
'#required' => TRUE,
);
$form['login'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}