XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
|
Public Member Functions | |
__construct (&$db) | |
XoopsNotificationHandler (&$db) | |
& | create ($isNew=true) |
& | get ($id) |
insert (&$notification) | |
delete (&$notification) | |
& | getObjects ($criteria=null, $id_as_key=false) |
getCount ($criteria=null) | |
deleteAll ($criteria=null) | |
& | getNotification ($module_id, $category, $item_id, $event, $user_id) |
isSubscribed ($category, $item_id, $event, $module_id, $user_id) | |
subscribe ($category, $item_id, $events, $mode=null, $module_id=null, $user_id=null) | |
& | getByUser ($user_id) |
& | getSubscribedEvents ($category, $item_id, $module_id, $user_id) |
& | getByItemId ($module_id, $item_id, $order=null, $status=null) |
triggerEvents ($category, $item_id, $events, $extra_tags=[], $user_list=[], $module_id=null, $omit_user_id=null) | |
triggerEvent ($category, $item_id, $event, $extra_tags=[], $user_list=[], $module_id=null, $omit_user_id=null) | |
unsubscribeByUser ($user_id) | |
unsubscribe ($category, $item_id, $events, $module_id=null, $user_id=null) | |
unsubscribeByModule ($module_id) | |
unsubscribeByItem ($module_id, $category, $item_id) | |
doLoginMaintenance ($user_id) | |
updateByField (&$notification, $field_name, $field_value) | |
![]() | |
& | create () |
Data Fields | |
$mTrigger = null | |
$mTriggerPreAction = null | |
![]() | |
$db | |
Protected Member Functions | |
_escapeValue ($value, $type=XOBJ_DTYPE_STRING) | |
Definition at line 167 of file notification.php.
__construct | ( | & | $db | ) |
called from child classes only
object | $db | reference to the XoopsDatabase object @access protected |
Reimplemented from XoopsObjectHandler.
Definition at line 179 of file notification.php.
|
protected |
Definition at line 194 of file notification.php.
& create | ( | $isNew = true | ) |
Create a XoopsNotification
bool | $isNew | Flag the object as "new"? |
Definition at line 222 of file notification.php.
delete | ( | & | $notification | ) |
Delete a XoopsNotification
from the database
object | &$notification |
Reimplemented from XoopsObjectHandler.
Definition at line 308 of file notification.php.
deleteAll | ( | $criteria = null | ) |
Delete multiple notifications
object | $criteria | CriteriaElement |
Definition at line 385 of file notification.php.
doLoginMaintenance | ( | $user_id | ) |
Perform notification maintenance activites at login time. In particular, any notifications for the newly logged-in user with mode XOOPS_NOTIFICATION_MODE_WAITFORLOGIN are switched to mode XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT.
int | $user_id | ID of the user being logged in |
Definition at line 890 of file notification.php.
& get | ( | $id | ) |
Retrieve a XoopsNotification
int | $id | ID |
XoopsNotification
, FALSE on fail Reimplemented from XoopsObjectHandler.
Definition at line 239 of file notification.php.
& getByItemId | ( | $module_id, | |
$item_id, | |||
$order = null, | |||
$status = null ) |
Retrieve items by their ID
int | $module_id | Module ID |
int | $item_id | Item ID |
string | $order | Sort order |
null | $status |
XoopsNotification
objects Definition at line 584 of file notification.php.
& getByUser | ( | $user_id | ) |
Get a list of notifications by user ID
int | $user_id | ID of the user |
XoopsNotification
objects Definition at line 538 of file notification.php.
getCount | ( | $criteria = null | ) |
Count Notifications
object | $criteria | CriteriaElement |
Definition at line 365 of file notification.php.
& getNotification | ( | $module_id, | |
$category, | |||
$item_id, | |||
$event, | |||
$user_id ) |
Change a value in multiple notifications
$module_id | |
$category | |
$item_id | |
$event | |
$user_id |
Definition at line 426 of file notification.php.
& getObjects | ( | $criteria = null, | |
$id_as_key = false ) |
Get some XoopsNotification
s
object | $criteria | |
bool | $id_as_key | Use IDs as keys into the array? |
XoopsNotification
objects Definition at line 328 of file notification.php.
& getSubscribedEvents | ( | $category, | |
$item_id, | |||
$module_id, | |||
$user_id ) |
Get a list of notification events for the current item/mod/user
$category | |
$item_id | |
$module_id | |
$user_id |
Definition at line 555 of file notification.php.
insert | ( | & | $notification | ) |
Write a notification(subscription) to database
object | &$notification |
Reimplemented from XoopsObjectHandler.
Definition at line 264 of file notification.php.
isSubscribed | ( | $category, | |
$item_id, | |||
$event, | |||
$module_id, | |||
$user_id ) |
Determine if a user is subscribed to a particular event in a particular module.
string | $category | Category of notification event |
int | $item_id | Item ID of notification event |
string | $event | Event |
int | $module_id | ID of module (default current module) |
int | $user_id | ID of user (default current user) return int 0 if not subscribe; non-zero if subscribed |
Definition at line 455 of file notification.php.
subscribe | ( | $category, | |
$item_id, | |||
$events, | |||
$mode = null, | |||
$module_id = null, | |||
$user_id = null ) |
Subscribe for notification for an event(s)
string | $category | category of notification |
int | $item_id | ID of the item |
mixed | $events | event string or array of events |
int | $mode | force a particular notification mode (e.g. once_only) (default to current user preference) |
int | $module_id | ID of the module (default to current module) |
int | $user_id | ID of the user (default to current user) |
Definition at line 484 of file notification.php.
triggerEvent | ( | $category, | |
$item_id, | |||
$event, | |||
$extra_tags = [], | |||
$user_list = [], | |||
$module_id = null, | |||
$omit_user_id = null ) |
Definition at line 628 of file notification.php.
triggerEvents | ( | $category, | |
$item_id, | |||
$events, | |||
$extra_tags = [], | |||
$user_list = [], | |||
$module_id = null, | |||
$omit_user_id = null ) |
Send notifications to users
string | $category | notification category |
int | $item_id | ID of the item |
$events | ||
array | $extra_tags | array of substitutions for template to be merged with the one from function.. |
array | $user_list | only notify the selected users |
int | $module_id | ID of the module |
int | $omit_user_id | ID of the user to omit from notifications. (default to current user). set to 0 for all users to receive notification. |
Definition at line 618 of file notification.php.
unsubscribe | ( | $category, | |
$item_id, | |||
$events, | |||
$module_id = null, | |||
$user_id = null ) |
Unsubscribe notifications for an event(s).
string | $category | category of the events |
int | $item_id | ID of the item |
mixed | $events | event string or array of events |
int | $module_id | ID of the module (default current module) |
int | $user_id | UID of the user (default current user) |
Definition at line 813 of file notification.php.
unsubscribeByItem | ( | $module_id, | |
$category, | |||
$item_id ) |
Delete all subscriptions for a particular item.
int | $module_id | ID of the module to which item belongs |
string | $category | Notification category of the item |
int | $item_id | ID of the item |
Definition at line 872 of file notification.php.
unsubscribeByModule | ( | $module_id | ) |
Delete all notifications for a particular module
int | $module_id | ID of the module |
Definition at line 856 of file notification.php.
unsubscribeByUser | ( | $user_id | ) |
Delete all notifications for one user
int | $user_id | ID of the user |
Definition at line 792 of file notification.php.
updateByField | ( | & | $notification, |
$field_name, | |||
$field_value ) |
Update
object | &$notification | XoopsNotification object |
string | $field_name | Name of the field |
mixed | $field_value | Value to write |
Definition at line 913 of file notification.php.
XoopsNotificationHandler | ( | & | $db | ) |
Definition at line 189 of file notification.php.
$mTrigger = null |
Definition at line 172 of file notification.php.
$mTriggerPreAction = null |
Definition at line 177 of file notification.php.