You are here

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

Constructs a new UserLoginBlock instance.

Parameters

array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name. The special key 'context' may be used to initialize the defined contexts by setting it to an array of context values keyed by context names.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

Overrides UserLoginBlock::__construct

File

src/Plugin/Block/TfaUserLoginBlock.php, line 50

Class

TfaUserLoginBlock
Provides a 'Tfa User login' block.

Namespace

Drupal\tfa\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $route_match);
  $this->tfaSettings = $config_factory
    ->get('tfa.settings');
}