You are here

public function SocialGroupInviteNotificationBlock::__construct in Open Social 10.0.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_group/modules/social_group_invite/src/Plugin/Block/SocialGroupInviteNotificationBlock.php \Drupal\social_group_invite\Plugin\Block\SocialGroupInviteNotificationBlock::__construct()
  2. 10.3.x modules/social_features/social_group/modules/social_group_invite/src/Plugin/Block/SocialGroupInviteNotificationBlock.php \Drupal\social_group_invite\Plugin\Block\SocialGroupInviteNotificationBlock::__construct()
  3. 10.1.x modules/social_features/social_group/modules/social_group_invite/src/Plugin/Block/SocialGroupInviteNotificationBlock.php \Drupal\social_group_invite\Plugin\Block\SocialGroupInviteNotificationBlock::__construct()
  4. 10.2.x modules/social_features/social_group/modules/social_group_invite/src/Plugin/Block/SocialGroupInviteNotificationBlock.php \Drupal\social_group_invite\Plugin\Block\SocialGroupInviteNotificationBlock::__construct()

Constructs SocialGroupInviteNotificationBlock.

Parameters

array $configuration: Configuration array.

string $plugin_id: Plugin ID.

mixed $plugin_definition: Plugin definition.

\Drupal\Core\Session\AccountInterface $account: User account entity.

\Drupal\ginvite\GroupInvitationLoaderInterface $inviteLoader: The invite loader.

\Drupal\Core\StringTranslation\TranslationManager $translation: The translation manager.

Overrides BlockPluginTrait::__construct

File

modules/social_features/social_group/modules/social_group_invite/src/Plugin/Block/SocialGroupInviteNotificationBlock.php, line 69

Class

SocialGroupInviteNotificationBlock
Provides a 'Invite notification' block.

Namespace

Drupal\social_group_invite\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $account, GroupInvitationLoaderInterface $inviteLoader, TranslationManager $translation) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->account = $account;
  $this->group = _social_group_get_current_group();
  $this->inviteLoader = $inviteLoader;
  $this->translation = $translation;
}