public function SimplenewsSourceEntity::__construct in Simplenews 7.2
Implements SimplenewsSourceEntityInterface::_construct();
Overrides SimplenewsSourceEntityInterface::__construct
1 call to SimplenewsSourceEntity::__construct()
- SimplenewsSourceNode::__construct in includes/
simplenews.source.inc - Overrides SimplenewsSourceEntity::__construct();
1 method overrides SimplenewsSourceEntity::__construct()
- SimplenewsSourceNode::__construct in includes/
simplenews.source.inc - Overrides SimplenewsSourceEntity::__construct();
File
- includes/
simplenews.source.inc, line 394 - Contains SimplenewsSource interface and implementations.
Class
- SimplenewsSourceEntity
- Default source class for entities.
Code
public function __construct($entity, $subscriber, $entity_type) {
$this
->setSubscriber($subscriber);
$this
->setEntity($entity, $entity_type);
$this
->initCache();
$this->newsletter = simplenews_newsletter_load(simplenews_issue_newsletter_id($entity));
}