Documentation

Notification_Notifications_Cron extends CronHandler
in package

Notification_Notifications_Cron class.

Table of Contents

MODULE_NAME  = 'Notification'
$cronTask  : Cron
$logs  : string
__construct()  : mixed
Construct.
checkTimeout()  : bool
Check cron task timeout.
getTaskLog()  : string
Get cron task logs.
process()  : void
Main function to execute task.
updateLastActionTime()  : void
Update cron task last action time.
executeScheduled()  : mixed
Function executes the sending notifications action.
existNotifications()  : array<string|int, mixed>
Function checks if notification exists.
getEndDate()  : string
Function get date.
markSentNotificationsAsRead()  : void
Function set notifications as read.

Constants

Properties

Methods

__construct()

Construct.

public __construct(Cron $cronTask) : mixed
Parameters
$cronTask : Cron
Return values
mixed

checkTimeout()

Check cron task timeout.

public checkTimeout() : bool
Return values
bool

getTaskLog()

Get cron task logs.

public getTaskLog() : string
Return values
string

process()

Main function to execute task.

public process() : void
Return values
void

updateLastActionTime()

Update cron task last action time.

public updateLastActionTime() : void
Return values
void

executeScheduled()

Function executes the sending notifications action.

private executeScheduled(array<string|int, mixed> $row) : mixed
Parameters
$row : array<string|int, mixed>
Return values
mixed

existNotifications()

Function checks if notification exists.

private existNotifications(int $userId, string $startDate, string $endDate) : array<string|int, mixed>
Parameters
$userId : int
$startDate : string
$endDate : string
Return values
array<string|int, mixed>

getEndDate()

Function get date.

private getEndDate(string $currentTime, string $timestampEndDate, int $frequency) : string
Parameters
$currentTime : string
$timestampEndDate : string
$frequency : int
Return values
string

markSentNotificationsAsRead()

Function set notifications as read.

private markSentNotificationsAsRead(mixed $notificationsToSend) : void
Parameters
$notificationsToSend : mixed
Return values
void

        

Search results