You are here

public function LockrKeyProvider::__construct in Lockr 8.4

Same name and namespace in other branches
  1. 8.2 src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::__construct()
  2. 8.3 src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::__construct()
  3. 4.x src/Plugin/KeyProvider/LockrKeyProvider.php \Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider::__construct()

Constructs a new LockrKeyProvider.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

ConfigFactoryInterface $config_factory: The simple config factory.

EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Lockr $lockr: The Lockr library client.

LoggerChannelFactoryInterface $logger_factory: The Drupal logger channel factory.

Overrides KeyPluginBase::__construct

File

src/Plugin/KeyProvider/LockrKeyProvider.php, line 81
Contains Drupal\lockr\Plugin\KeyProvider\LockrKeyProvider.

Class

LockrKeyProvider
Adds a key provider that allows a key to be stored in Lockr.

Namespace

Drupal\lockr\Plugin\KeyProvider

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, Lockr $lockr, LoggerChannelFactoryInterface $logger_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->configFactory = $config_factory;
  $this->secretStorage = $entity_type_manager
    ->getStorage('lockr_secret');
  $this->lockr = $lockr;
  $this->logger = $logger_factory
    ->get('lockr');
}