You are here

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

Constructs a new TfaSetup plugin manager.

Parameters

\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

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

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

\Drupal\encrypt\EncryptService $encrypt_service: Encryption service.

Overrides DefaultPluginManager::__construct

File

src/TfaSetupPluginManager.php, line 56

Class

TfaSetupPluginManager
The setup plugin manager.

Namespace

Drupal\tfa

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, UserDataInterface $user_data, EncryptionProfileManagerInterface $encryption_profile_manager, EncryptService $encrypt_service) {
  parent::__construct('Plugin/TfaSetup', $namespaces, $module_handler, 'Drupal\\tfa\\Plugin\\TfaSetupInterface', 'Drupal\\tfa\\Annotation\\TfaSetup');
  $this
    ->alterInfo('tfa_setup_info');
  $this
    ->setCacheBackend($cache_backend, 'tfa_setup');
  $this->userData = $user_data;
  $this->encryptService = $encrypt_service;
  $this->encryptionProfileManager = $encryption_profile_manager;
}