You are here

public function SocialInviteSubscriber::__construct in Open Social 8.9

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_core/src/EventSubscriber/SocialInviteSubscriber.php \Drupal\social_core\EventSubscriber\SocialInviteSubscriber::__construct()
  2. 10.0.x modules/social_features/social_core/src/EventSubscriber/SocialInviteSubscriber.php \Drupal\social_core\EventSubscriber\SocialInviteSubscriber::__construct()
  3. 10.1.x modules/social_features/social_core/src/EventSubscriber/SocialInviteSubscriber.php \Drupal\social_core\EventSubscriber\SocialInviteSubscriber::__construct()
  4. 10.2.x modules/social_features/social_core/src/EventSubscriber/SocialInviteSubscriber.php \Drupal\social_core\EventSubscriber\SocialInviteSubscriber::__construct()

Constructs SocialInviteSubscriber.

Parameters

\Drupal\social_core\InviteService $inviteService: Invitations loader service.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

\Drupal\Core\Routing\CurrentRouteMatch $route_match: The current route.

\Drupal\Core\Config\ConfigFactory $config_factory: The config factory.

File

modules/social_features/social_core/src/EventSubscriber/SocialInviteSubscriber.php, line 81

Class

SocialInviteSubscriber
Social event subscriber.

Namespace

Drupal\social_core\EventSubscriber

Code

public function __construct(InviteService $inviteService, AccountInterface $current_user, MessengerInterface $messenger, CurrentRouteMatch $route_match, ConfigFactory $config_factory) {
  $this->inviteService = $inviteService;
  $this->currentUser = $current_user;
  $this->messenger = $messenger;
  $this->currentRoute = $route_match;
  $this->alternativeFrontpageSettings = $config_factory
    ->get('alternative_frontpage.settings');
  $this->siteSettings = $config_factory
    ->get('system.site');
}