You are here

public function UserEmailVerificationNotificationBlock::__construct in User email verification 8

Constructs a new object.

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\user_email_verification\UserEmailVerificationInterface $user_email_verification_service: User email verification helper service.

\Drupal\Core\Session\AccountProxyInterface $current_user: The current active user.

\Drupal\Core\Utility\Token $token: The token service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/UserEmailVerificationNotificationBlock.php, line 61

Class

UserEmailVerificationNotificationBlock
Block to display 'You have to verify your Email' notification.

Namespace

Drupal\user_email_verification\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, UserEmailVerificationInterface $user_email_verification_service, AccountProxyInterface $current_user, Token $token) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->userEmailVerification = $user_email_verification_service;
  $this->currentUser = $current_user;
  $this->token = $token;
}