NotificationService extends BackgroundProcess
in package

Tags
since
1.13.0

Table of Contents

ACTION_TRIGGER_NOTIFICATION  = 'trigger-notification'
META_NOTIFICATION_SENT  = '_mpa_notification_sent'
OPTION_LAST_EXECUTION  = 'mpa_notification_service_last_execution'
$action  : string
Be careful with the action name: the background process will create a bunch of options that may conflict with other parts of the plugin. For example, the "send_notifications" action will conflict with SendNotificationsCron (because of "mpa_send_notifications_cron" option).
$prefix  : string
$optionEmailsSent  : string
$optionNotificationsTriggered  : string
$optionStartedAt  : string
__construct()  : mixed
task()  : mixed
triggerAll()  : mixed
triggerNotificationForReservation()  : bool
afterComplete()  : mixed
clearOptions()  : mixed
emailsSent()  : int
increaseEmailSent()  : mixed
increaseNotificationsTriggered()  : mixed
notificationsTriggered()  : int
startedAt()  : int
triggerNotification()  : bool

Constants

ACTION_TRIGGER_NOTIFICATION

public mixed ACTION_TRIGGER_NOTIFICATION = 'trigger-notification'

META_NOTIFICATION_SENT

public mixed META_NOTIFICATION_SENT = '_mpa_notification_sent'

OPTION_LAST_EXECUTION

public mixed OPTION_LAST_EXECUTION = 'mpa_notification_service_last_execution'

Properties

$action

Be careful with the action name: the background process will create a bunch of options that may conflict with other parts of the plugin. For example, the "send_notifications" action will conflict with SendNotificationsCron (because of "mpa_send_notifications_cron" option).

public string $action = 'notification_service'

$prefix

public string $prefix = 'mpa'

$optionEmailsSent

protected string $optionEmailsSent

$optionNotificationsTriggered

protected string $optionNotificationsTriggered

$optionStartedAt

protected string $optionStartedAt

Methods

__construct()

public __construct([mixed $properties = [] ]) : mixed
Parameters
$properties : mixed = []
Return values
mixed

task()

public task(mixed $workload) : mixed
Parameters
$workload : mixed
Return values
mixed

triggerAll()

public triggerAll() : mixed
Return values
mixed

triggerNotificationForReservation()

public triggerNotificationForReservation(Notification $notification, Reservation $reservation) : bool
Parameters
$notification : Notification
$reservation : Reservation
Return values
bool

afterComplete()

protected afterComplete() : mixed
Return values
mixed

clearOptions()

protected clearOptions() : mixed
Return values
mixed

emailsSent()

protected emailsSent() : int
Return values
int

increaseEmailSent()

protected increaseEmailSent(int $increment) : mixed
Parameters
$increment : int
Return values
mixed

increaseNotificationsTriggered()

protected increaseNotificationsTriggered([int $increment = 1 ]) : mixed
Parameters
$increment : int = 1
Return values
mixed

notificationsTriggered()

protected notificationsTriggered() : int
Return values
int

startedAt()

protected startedAt() : int
Return values
int

triggerNotification()

protected triggerNotification(int $notificationId) : bool
Parameters
$notificationId : int
Return values
bool

Search results