public function MailEntity::__construct in Simplenews 8
Same name and namespace in other branches
- 8.2 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 $entity, SubscriberInterface $subscriber, MailCacheInterface $mail_cache) {
$this
->setSubscriber($subscriber);
$this
->setEntity($entity);
$this->cache = $mail_cache;
$this->newsletter = $entity->simplenews_issue->entity;
}