You are here

public function PrivateMessageNotificationBlock::__construct in Private Message 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Block/PrivateMessageNotificationBlock.php \Drupal\private_message\Plugin\Block\PrivateMessageNotificationBlock::__construct()

Constructs a PrivateMessageForm object.

Parameters

array $configuration: The block configuration.

string $plugin_id: The ID of the plugin.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.

\Drupal\Core\Access\CsrfTokenGenerator $csrfToken: The CSRF token generator service.

\Drupal\private_message\Service\PrivateMessageServiceInterface $privateMessageService: The private message service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/PrivateMessageNotificationBlock.php, line 64

Class

PrivateMessageNotificationBlock
Provides the private message notification block.

Namespace

Drupal\private_message\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountProxyInterface $currentUser, CsrfTokenGenerator $csrfToken, PrivateMessageServiceInterface $privateMessageService) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $currentUser;
  $this->csrfToken = $csrfToken;
  $this->privateMessageService = $privateMessageService;
}