public function MailBuilder::__construct in Simplenews 3.x
Same name and namespace in other branches
- 8.2 src/Mail/MailBuilder.php \Drupal\simplenews\Mail\MailBuilder::__construct()
- 8 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 45
Class
- MailBuilder
- Default mail builder.
Namespace
Drupal\simplenews\MailCode
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;
}