You are here

public function SubscriptionController::__construct in Message Subscribe 8

Construct the subscriptions controller.

Parameters

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

\Drupal\flag\FlagServiceInterface $flag_service: The flag service manager.

\Drupal\message_subscribe\SubscribersInterface $subscribers: The message subscribers service.

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

File

message_subscribe_ui/src/Controller/SubscriptionController.php, line 63

Class

SubscriptionController
Default controller for the message_subscribe_ui module.

Namespace

Drupal\message_subscribe_ui\Controller

Code

public function __construct(AccountProxyInterface $current_user, FlagServiceInterface $flag_service, SubscribersInterface $subscribers, ConfigFactoryInterface $config_factory) {
  $this->currentUser = $current_user;
  $this->flagService = $flag_service;
  $this->subscribers = $subscribers;
  $this->config = $config_factory
    ->get('message_subscribe.settings');
}