You are here

public function SettingsForm::__construct in Two-factor Authentication (TFA) 8

The admin configuration form constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory object.

\Drupal\tfa\TfaLoginPluginManager $tfa_login: The login plugin manager.

\Drupal\tfa\TfaSendPluginManager $tfa_send: The send plugin manager.

\Drupal\tfa\TfaValidationPluginManager $tfa_validation: The validation plugin manager.

\Drupal\tfa\TfaSetupPluginManager $tfa_setup: The setup plugin manager.

\Drupal\user\UserDataInterface $user_data: The user data service.

\Drupal\encrypt\EncryptionProfileManagerInterface $encryption_profile_manager: Encrypt profile manager.

Overrides ConfigFormBase::__construct

File

src/Form/SettingsForm.php, line 85

Class

SettingsForm
The admin configuration page.

Namespace

Drupal\tfa\Form

Code

public function __construct(ConfigFactoryInterface $config_factory, TfaLoginPluginManager $tfa_login, TfaSendPluginManager $tfa_send, TfaValidationPluginManager $tfa_validation, TfaSetupPluginManager $tfa_setup, UserDataInterface $user_data, EncryptionProfileManagerInterface $encryption_profile_manager) {
  parent::__construct($config_factory);
  $this->tfaLogin = $tfa_login;
  $this->tfaSend = $tfa_send;
  $this->tfaSetup = $tfa_setup;
  $this->tfaValidation = $tfa_validation;
  $this->encryptionProfileManager = $encryption_profile_manager;

  // User Data service to store user-based data in key value pairs.
  $this->userData = $user_data;
}