You are here

public function PrivateMessageInboxBlock::__construct in Private Message 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Block/PrivateMessageInboxBlock.php \Drupal\private_message\Plugin\Block\PrivateMessageInboxBlock::__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\private_message\Service\PrivateMessageServiceInterface $privateMessageService: The private message service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity manager service.

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

\Drupal\Core\Config\ConfigFactoryInterface $config: The config service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/PrivateMessageInboxBlock.php, line 84

Class

PrivateMessageInboxBlock
Provides the private message inbox block.

Namespace

Drupal\private_message\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountProxyInterface $currentUser, PrivateMessageServiceInterface $privateMessageService, EntityTypeManagerInterface $entityTypeManager, CsrfTokenGenerator $csrfToken, ConfigFactoryInterface $config) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $currentUser;
  $this->privateMessageService = $privateMessageService;
  $this->entityTypeManager = $entityTypeManager;
  $this->csrfToken = $csrfToken;
  $this->privateMessageConfig = $config
    ->get('private_message.settings');
}