Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\NotificationBundle\Event;
|
||||
|
||||
use Mautic\CoreBundle\Event\CommonEvent;
|
||||
use Mautic\NotificationBundle\Entity\Notification;
|
||||
|
||||
class NotificationEvent extends CommonEvent
|
||||
{
|
||||
/**
|
||||
* @param bool $isNew
|
||||
*/
|
||||
public function __construct(Notification $notification, $isNew = false)
|
||||
{
|
||||
$this->entity = $notification;
|
||||
$this->isNew = $isNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Notification entity.
|
||||
*
|
||||
* @return Notification
|
||||
*/
|
||||
public function getNotification()
|
||||
{
|
||||
return $this->entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Notification entity.
|
||||
*/
|
||||
public function setNotification(Notification $notification): void
|
||||
{
|
||||
$this->entity = $notification;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\NotificationBundle\Event;
|
||||
|
||||
use Mautic\CoreBundle\Event\CommonEvent;
|
||||
use Mautic\LeadBundle\Entity\Lead;
|
||||
|
||||
class NotificationSendEvent extends CommonEvent
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
public function __construct(
|
||||
protected $message,
|
||||
protected $heading,
|
||||
protected Lead $lead,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*/
|
||||
public function setMessage($message): void
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getHeading()
|
||||
{
|
||||
return $this->heading;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $heading
|
||||
*
|
||||
* @return NotificationSendEvent
|
||||
*/
|
||||
public function setHeading($heading)
|
||||
{
|
||||
$this->heading = $heading;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Lead
|
||||
*/
|
||||
public function getLead()
|
||||
{
|
||||
return $this->lead;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user