Generate Notification By Number
Function: genNotifByNum
Visibility: public
Parameter: genNotifByNum($fileName,$notifNum,$externalVar)
Description:
Simply generate a notification by it's number. The notifications can also be dynamic with:
- The notifications numbers and text can be set at the notification file we choosing at loadNotifs.
- The notification template can be set at notif.
$externalVar
, notification data will be loaded from the $fileName
we choose.- The notifications numbers and text can be set at the notification file we choosing at loadNotifs.
- The notification template can be set at notif.
Parameters:
(required) - string - $fileName - The name of the file we want to load the notifications from (without extention), located at: \text\notifs\{language code}\ (actual file will be with php/xml extention).
(required) - string|array - $notifNum - The notification number.
(optional) - string|array|null - $externalVar - The external variant to use in this notification.
Return:
array - The specific notification including: $notifType,$authLevel,$notifTextRand.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to popup an alert, so we will generate the notification by it's number.
How to call (example):
Possible outcome (example):
Output: