CronNotificationComponent
extends BaseComponent
in package
Class UserComponent
Table of Contents
Properties
Methods
- createThresholdGritterNotification() : Notification
- createThresholdMailNotification() : ThresholdAlmostReachedMail|ThresholdReachedMail
- getFinishedUnmarkedReports() : array<string|int, mixed>
- getNotificationMarkByKey() : null|NotificationMark
- getThresholds() : array<string|int, Threshold>
- Get all threshold with country for a user which is over the provided threshold limit for the provided year
- getUsersWithThreshold() : array<string|int, Client>
- Get all users who has reached the provided minimum threshold limit for the provided year
- getUsersWithUnreadNotifications() : Complex
- Returns users who has more notifications than the provided min limit
- hasNotificationCheck() : bool
- Returns true if the user has a note for a notification key
- saveNotificationCheck() : bool
- Saves a note for a notification key
- _() : mixed
Properties
$trans read-only
public
Translator
$trans
Methods
createThresholdGritterNotification()
public
createThresholdGritterNotification(Client $user, string $countryCode, bool $overThreshold) : Notification
Parameters
- $user : Client
- $countryCode : string
- $overThreshold : bool
Return values
NotificationcreateThresholdMailNotification()
public
createThresholdMailNotification(UserAccount|UserWrapper|string $user, array<string|int, mixed> $countryCodes, bool $overThreshold) : ThresholdAlmostReachedMail|ThresholdReachedMail
Parameters
- $user : UserAccount|UserWrapper|string
- $countryCodes : array<string|int, mixed>
- $overThreshold : bool
Return values
ThresholdAlmostReachedMail|ThresholdReachedMailgetFinishedUnmarkedReports()
public
getFinishedUnmarkedReports(mixed $userId, mixed $lastNotificationDate[, bool $limit = false ][, bool $mark = true ]) : array<string|int, mixed>
Parameters
- $userId : mixed
- $lastNotificationDate : mixed
- $limit : bool = false
- $mark : bool = true
Tags
Return values
array<string|int, mixed> —[$reports, $columns, $min, $max]
getNotificationMarkByKey()
public
getNotificationMarkByKey(Client|int $user, string $notificationKey) : null|NotificationMark
Parameters
- $user : Client|int
- $notificationKey : string
Return values
null|NotificationMarkgetThresholds()
Get all threshold with country for a user which is over the provided threshold limit for the provided year
public
getThresholds(Client $user, int $year, int $min) : array<string|int, Threshold>
Parameters
- $user : Client
- $year : int
- $min : int
Return values
array<string|int, Threshold>getUsersWithThreshold()
Get all users who has reached the provided minimum threshold limit for the provided year
public
getUsersWithThreshold(int $year, float $min) : array<string|int, Client>
Parameters
- $year : int
- $min : float
Return values
array<string|int, Client>getUsersWithUnreadNotifications()
Returns users who has more notifications than the provided min limit
public
getUsersWithUnreadNotifications(int $min) : Complex
Parameters
- $min : int
Return values
Complex —In the result set '_us' is a and '_n' is the number of notifications
hasNotificationCheck()
Returns true if the user has a note for a notification key
public
hasNotificationCheck(Client|int $user, string $notificationKey) : bool
Parameters
- $user : Client|int
- $notificationKey : string
Return values
boolsaveNotificationCheck()
Saves a note for a notification key
public
saveNotificationCheck(Client|int $user, string $notificationKey) : bool
Parameters
- $user : Client|int
- $notificationKey : string
Return values
bool_()
protected
static _(mixed $string[, array<string|int, mixed> $params = [] ]) : mixed
Parameters
- $string : mixed
- $params : array<string|int, mixed> = []