![]() |
API - XOOPS 2.5.11 Beta 2
By monxoops.fr
|


Public Member Functions | |
| create ($isNew=true) | |
| get ($id) | |
| insert (XoopsObject $notification) | |
| delete (XoopsObject $notification) | |
| getObjects (CriteriaElement $criteria=null, $id_as_key=false) | |
| getCount (CriteriaElement $criteria=null) | |
| deleteAll (CriteriaElement $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, $mode=null) | |
| triggerEvents ($category, $item_id, $events, $extra_tags=array(), $user_list=array(), $module_id=null, $omit_user_id=null) | |
| triggerEvent ($category, $item_id, $event, $extra_tags=array(), $user_list=array(), $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 (XoopsNotification $notification, $field_name, $field_value) | |
Public Member Functions inherited from XoopsObjectHandler | |
| __construct (XoopsDatabase $db) | |
| XoopsObjectHandler ($db) | |
| create () | |
| get ($id) | |
| insert (XoopsObject $object) | |
| delete (XoopsObject $object) | |
Additional Inherited Members | |
Data Fields inherited from XoopsObjectHandler | |
| $db | |
| create | ( | $isNew = true | ) |
| delete | ( | XoopsObject | $notification | ) |
Delete a XoopsNotification from the database
| XoopsObject | XoopsNotification | $notification | a XoopsNotification object |
Reimplemented from XoopsObjectHandler.
| deleteAll | ( | CriteriaElement | $criteria = null | ) |
Delete multiple notifications
| CriteriaElement | CriteriaCompo | $criteria | CriteriaElement |

| 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 |

| get | ( | $id | ) |
Retrieve a XoopsNotification
| int | $id | ID |
XoopsNotification, FALSE on fail Reimplemented from XoopsObjectHandler.
| getByItemId | ( | $module_id, | |
| $item_id, | |||
$order = null, |
|||
$mode = null |
|||
| ) |
Retrieve items by their ID
| int | $module_id | Module ID |
| int | $item_id | Item ID |
| string | $order | Sort order |
| int | $mode | not_mode see include/notification_constants.php |
| null | $status |
XoopsNotification objects 
| getByUser | ( | $user_id | ) |
Get a list of notifications by user ID
| int | $user_id | ID of the user |
XoopsNotification objects 
| getCount | ( | CriteriaElement | $criteria = null | ) |
Count Notifications
| CriteriaElement | CriteriaCompo | $criteria | CriteriaElement |

| & getNotification | ( | $module_id, | |
| $category, | |||
| $item_id, | |||
| $event, | |||
| $user_id | |||
| ) |
| $module_id | |
| $category | |
| $item_id | |
| $event | |
| $user_id |


| getObjects | ( | CriteriaElement | $criteria = null, |
$id_as_key = false |
|||
| ) |
Get some XoopsNotifications
| CriteriaElement | CriteriaCompo | $criteria | |
| bool | $id_as_key | Use IDs as keys into the array? |
XoopsNotification objects 
| 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 |

| insert | ( | XoopsObject | $notification | ) |
Write a notification(subscription) to database
| XoopsObject | XoopsNotification | $notification | a XoopsNotification object |
Reimplemented from XoopsObjectHandler.


| 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 |

| 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) |

| triggerEvent | ( | $category, | |
| $item_id, | |||
| $event, | |||
$extra_tags = array(), |
|||
$user_list = array(), |
|||
$module_id = null, |
|||
$omit_user_id = null |
|||
| ) |
Trigger a single notification event
| string | $category | |
| int | $item_id | |
| string | $event | |
| array | $extra_tags | |
| array | $user_list | |
| int | $module_id | |
| int | $omit_user_id |


| triggerEvents | ( | $category, | |
| $item_id, | |||
| $events, | |||
$extra_tags = array(), |
|||
$user_list = array(), |
|||
$module_id = null, |
|||
$omit_user_id = null |
|||
| ) |
Send notifications to users
| string | $category | notification category |
| int | $item_id | ID of the item |
| array | $events | trigger 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. |

| 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) |

| 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 |

| unsubscribeByModule | ( | $module_id | ) |
Delete all notifications for a particular module
| int | $module_id | ID of the module |

| unsubscribeByUser | ( | $user_id | ) |
Delete all notifications for one user
| int | $user_id | ID of the user |

| updateByField | ( | XoopsNotification | $notification, |
| $field_name, | |||
| $field_value | |||
| ) |
Update
| XoopsNotification | $notification | XoopsNotification object |
| string | $field_name | Name of the field |
| mixed | $field_value | Value to write |

