You are here

public function SocialGroupRequestMembershipNotification::__construct in Open Social 8.9

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

Constructs SocialGroupRequestMembershipNotification.

Parameters

array $configuration: Configuration array.

string $plugin_id: Plugin ID.

mixed $plugin_definition: Plugin definition.

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

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

Overrides BlockPluginTrait::__construct

File

modules/social_features/social_group/modules/social_group_request/src/Plugin/Block/SocialGroupRequestMembershipNotification.php, line 72

Class

SocialGroupRequestMembershipNotification
Provides a 'Membership requests notification' block.

Namespace

Drupal\social_group_request\Plugin\Block

Code

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