public function MailEntity::__construct in Simplenews 8.2
Same name and namespace in other branches
- 8 src/Mail/MailEntity.php \Drupal\simplenews\Mail\MailEntity::__construct()
- 3.x src/Mail/MailEntity.php \Drupal\simplenews\Mail\MailEntity::__construct()
Constructs a MailEntity object.
File
- src/
Mail/ MailEntity.php, line 64
Class
- MailEntity
- Default mail class for entities.
Namespace
Drupal\simplenews\MailCode
public function __construct(ContentEntityInterface $issue, SubscriberInterface $subscriber, MailCacheInterface $mail_cache) {
$this->subscriber = $subscriber;
$this->issue = $issue;
if ($this->issue
->hasTranslation($this
->getLanguage())) {
$this->issue = $this->issue
->getTranslation($this
->getLanguage());
}
$this->cache = $mail_cache;
$this->newsletter = $issue->simplenews_issue->entity;
}