You are here

public function LastLoginBlock::__construct in Login History 8

Creates a LastLoginBlock instance.

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.

\Drupal\Core\Session\AccountProxy $currentUser: The account proxy service.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/LastLoginBlock.php, line 53

Class

LastLoginBlock
Provides a block with information about the user's last login.

Namespace

Drupal\login_history\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountProxy $currentUser, RequestStack $requestStack) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $currentUser;
  $this->requestStack = $requestStack;
}