Allow data pass to entities
[PREMIUM-142]
This commit is contained in:
@ -22,20 +22,20 @@ class NewsletterLinkEntity {
|
|||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity")
|
* @ORM\ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity")
|
||||||
* @ORM\JoinColumn(name="newsletter_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="newsletter_id", referencedColumnName="id")
|
||||||
* @var NewsletterEntity|null
|
* @var NewsletterEntity
|
||||||
*/
|
*/
|
||||||
private $newsletter;
|
private $newsletter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="MailPoet\Entities\SendingQueueEntity")
|
* @ORM\ManyToOne(targetEntity="MailPoet\Entities\SendingQueueEntity")
|
||||||
* @ORM\JoinColumn(name="queue_id", referencedColumnName="id")
|
* @ORM\JoinColumn(name="queue_id", referencedColumnName="id")
|
||||||
* @var SendingQueueEntity|null
|
* @var SendingQueueEntity
|
||||||
*/
|
*/
|
||||||
private $queue;
|
private $queue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string")
|
* @ORM\Column(type="string")
|
||||||
* @var string|null
|
* @var string
|
||||||
*/
|
*/
|
||||||
private $url;
|
private $url;
|
||||||
|
|
||||||
@ -54,6 +54,13 @@ class NewsletterLinkEntity {
|
|||||||
*/
|
*/
|
||||||
private $clicks;
|
private $clicks;
|
||||||
|
|
||||||
|
public function __construct(NewsletterEntity $newsletter, SendingQueueEntity $queue, string $url, string $hash) {
|
||||||
|
$this->newsletter = $newsletter;
|
||||||
|
$this->queue = $queue;
|
||||||
|
$this->url = $url;
|
||||||
|
$this->hash = $hash;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return NewsletterEntity|null
|
* @return NewsletterEntity|null
|
||||||
*/
|
*/
|
||||||
@ -70,17 +77,11 @@ class NewsletterLinkEntity {
|
|||||||
return $this->queue;
|
return $this->queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getUrl(): string {
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public function getUrl() {
|
|
||||||
return $this->url;
|
return $this->url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getHash(): string {
|
||||||
* @return string|null
|
|
||||||
*/
|
|
||||||
public function getHash() {
|
|
||||||
return $this->hash;
|
return $this->hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,4 +73,39 @@ class StatisticsClickEntity {
|
|||||||
$this->safelyLoadToOneAssociation('link');
|
$this->safelyLoadToOneAssociation('link');
|
||||||
return $this->link;
|
return $this->link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param NewsletterEntity|null $newsletter
|
||||||
|
*/
|
||||||
|
public function setNewsletter($newsletter) {
|
||||||
|
$this->newsletter = $newsletter;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param SendingQueueEntity|null $queue
|
||||||
|
*/
|
||||||
|
public function setQueue($queue) {
|
||||||
|
$this->queue = $queue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int|null $subscriberId
|
||||||
|
*/
|
||||||
|
public function setSubscriberId($subscriberId) {
|
||||||
|
$this->subscriberId = $subscriberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param NewsletterLinkEntity|null $link
|
||||||
|
*/
|
||||||
|
public function setLink($link) {
|
||||||
|
$this->link = $link;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $count
|
||||||
|
*/
|
||||||
|
public function setCount(int $count) {
|
||||||
|
$this->count = $count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,4 +51,25 @@ class StatisticsOpenEntity {
|
|||||||
$this->safelyLoadToOneAssociation('queue');
|
$this->safelyLoadToOneAssociation('queue');
|
||||||
return $this->queue;
|
return $this->queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param NewsletterEntity|null $newsletter
|
||||||
|
*/
|
||||||
|
public function setNewsletter($newsletter) {
|
||||||
|
$this->newsletter = $newsletter;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param SendingQueueEntity|null $queue
|
||||||
|
*/
|
||||||
|
public function setQueue($queue) {
|
||||||
|
$this->queue = $queue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int|null $subscriberId
|
||||||
|
*/
|
||||||
|
public function setSubscriberId($subscriberId) {
|
||||||
|
$this->subscriberId = $subscriberId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -111,4 +111,11 @@ class StatisticsWooCommercePurchaseEntity {
|
|||||||
public function getOrderId() {
|
public function getOrderId() {
|
||||||
return $this->orderId;
|
return $this->orderId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param SubscriberEntity|null $subscriber
|
||||||
|
*/
|
||||||
|
public function setSubscriber($subscriber) {
|
||||||
|
$this->subscriber = $subscriber;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user