You are here

public function MailBuilder::__construct in Simplenews 8

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

Constructs a MailBuilder.

Parameters

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

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

\Drupal\simplenews\Subscription\SubscriptionManagerInterface $subscription_manager: The subscription manager.

File

src/Mail/MailBuilder.php, line 40

Class

MailBuilder
Default mail builder.

Namespace

Drupal\simplenews\Mail

Code

public function __construct(Token $token, ConfigFactoryInterface $config_factory, SubscriptionManagerInterface $subscription_manager) {
  $this->token = $token;
  $this->config = $config_factory
    ->get('simplenews.settings');
  $this->subscriptionManager = $subscription_manager;
}