public function GALoginHotpSetup::getOverview in Google Authenticator login 8
Plugin overview page.
Parameters
array $params: Parameters to setup the overview information.
Return value
array The overview form.
Overrides TfaSetupInterface::getOverview
File
- src/
Plugin/ TfaSetup/ GALoginHotpSetup.php, line 189
Class
- GALoginHotpSetup
- HOTP setup class to setup HOTP validation.
Namespace
Drupal\ga_login\Plugin\TfaSetupCode
public function getOverview(array $params) {
$plugin_text = $this
->t('Validation Plugin: @plugin', [
'@plugin' => str_replace(' Setup', '', $this
->getLabel()),
]);
$output = [
'heading' => [
'#type' => 'html_tag',
'#tag' => 'h2',
'#value' => $this
->t('TFA application'),
],
'validation_plugin' => [
'#type' => 'markup',
'#markup' => '<p>' . $plugin_text . '</p>',
],
'description' => [
'#type' => 'html_tag',
'#tag' => 'p',
'#value' => $this
->t('Generate verification codes from a mobile or desktop application.'),
],
'link' => [
'#theme' => 'links',
'#links' => [
'admin' => [
'title' => !$params['enabled'] ? $this
->t('Set up application') : $this
->t('Reset application'),
'url' => Url::fromRoute('tfa.validation.setup', [
'user' => $params['account']
->id(),
'method' => $params['plugin_id'],
]),
],
],
],
];
return $output;
}