You are here

public function SubscriptionManager::__construct in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Subscription/SubscriptionManager.php \Drupal\simplenews\Subscription\SubscriptionManager::__construct()
  2. 3.x src/Subscription/SubscriptionManager.php \Drupal\simplenews\Subscription\SubscriptionManager::__construct()

Constructs a SubscriptionManager.

Parameters

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

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

\Drupal\simplenews\Mail\MailerInterface $mailer: The simplenews manager.

\Drupal\Core\Utility\Token $token: The token service.

\Psr\Log\LoggerInterface $logger: The simplenews logger channel.

File

src/Subscription/SubscriptionManager.php, line 84

Class

SubscriptionManager
Default subscription manager.

Namespace

Drupal\simplenews\Subscription

Code

public function __construct(LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory, MailerInterface $mailer, Token $token, LoggerInterface $logger, AccountInterface $current_user) {
  $this->languageManager = $language_manager;
  $this->config = $config_factory
    ->get('simplenews.settings');
  $this->mailer = $mailer;
  $this->token = $token;
  $this->logger = $logger;
  $this->currentUser = $current_user;
}