|
XOOPS 2.5.6
Final
|

Public Member Functions | |
| & | create ($isNew=true) |
| delete (&$notification) | |
| deleteAll ($criteria=null) | |
| doLoginMaintenance ($user_id) | |
| & | get ($id) |
| getByItemId ($module_id, $item_id, $order=null, $status=null) | |
| getByUser ($user_id) | |
| getCount ($criteria=null) | |
| & | getNotification ($module_id, $category, $item_id, $event, $user_id) |
| getObjects ($criteria=null, $id_as_key=false) | |
| getSubscribedEvents ($category, $item_id, $module_id, $user_id) | |
| insert (&$notification) | |
| isSubscribed ($category, $item_id, $event, $module_id, $user_id) | |
| subscribe ($category, $item_id, $events, $mode=null, $module_id=null, $user_id=null) | |
| triggerEvent ($category, $item_id, $event, $extra_tags=array(), $user_list=array(), $module_id=null, $omit_user_id=null) | |
| triggerEvents ($category, $item_id, $events, $extra_tags=array(), $user_list=array(), $module_id=null, $omit_user_id=null) | |
| unsubscribe ($category, $item_id, $events, $module_id=null, $user_id=null) | |
| unsubscribeByItem ($module_id, $category, $item_id) | |
| unsubscribeByModule ($module_id) | |
| unsubscribeByUser ($user_id) | |
| updateByField (&$notification, $field_name, $field_value) | |
Public Member Functions inherited from XoopsObjectHandler | |
| & | create () |
| delete (&$object) | |
| & | get ($int_id) |
| insert (&$object) | |
| XoopsObjectHandler (&$db) | |
Additional Inherited Members | |
Public Attributes inherited from XoopsObjectHandler | |
| $db | |
Definition at line 210 of file notification.php.
| & XoopsNotificationHandler::create | ( | $isNew = true | ) |
Create a XoopsNotification
| bool | $isNew | Flag the object as "new"? |
Definition at line 219 of file notification.php.
| XoopsNotificationHandler::delete | ( | & | $notification | ) |
Delete a XoopsNotification from the database
| object | &$notification |
: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
Definition at line 300 of file notification.php.
| XoopsNotificationHandler::deleteAll | ( | $criteria = null | ) |
Delete multiple notifications
| object | $criteria | CriteriaElement |
Definition at line 381 of file notification.php.
References $criteria, $result, and $sql.
Referenced by unsubscribe(), unsubscribeByItem(), unsubscribeByModule(), and unsubscribeByUser().

| XoopsNotificationHandler::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 796 of file notification.php.
References $criteria, $user_id, getObjects(), insert(), XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT, and XOOPS_NOTIFICATION_MODE_WAITFORLOGIN.

| & XoopsNotificationHandler::get | ( | $id | ) |
Retrieve a XoopsNotification
| int | $id | ID |
Definition at line 235 of file notification.php.
| XoopsNotificationHandler::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 |
Definition at line 539 of file notification.php.
References $criteria, $module_id, $status, and getObjects().

| XoopsNotificationHandler::getByUser | ( | $user_id | ) |
Get a list of notifications by user ID
| int | $user_id | ID of the user |
Definition at line 501 of file notification.php.
References $criteria, $user_id, and getObjects().

| XoopsNotificationHandler::getCount | ( | $criteria = null | ) |
Count Notifications
| object | $criteria | CriteriaElement |
Definition at line 361 of file notification.php.
References $criteria, $result, and $sql.
Referenced by isSubscribed().

| & XoopsNotificationHandler::getNotification | ( | $module_id, | |
| $category, | |||
| $item_id, | |||
| $event, | |||
| $user_id | |||
| ) |
Definition at line 395 of file notification.php.
References $criteria, $module_id, $user_id, and getObjects().
Referenced by subscribe().


| XoopsNotificationHandler::getObjects | ( | $criteria = null, |
|
$id_as_key = false |
|||
| ) |
Get some XoopsNotifications
| object | $criteria | |
| bool | $id_as_key | Use IDs as keys into the array? |
Definition at line 324 of file notification.php.
References $criteria, $limit, $result, $ret, $sql, and $start.
Referenced by doLoginMaintenance(), getByItemId(), getByUser(), getNotification(), getSubscribedEvents(), and triggerEvent().

| XoopsNotificationHandler::getSubscribedEvents | ( | $category, | |
| $item_id, | |||
| $module_id, | |||
| $user_id | |||
| ) |
Get a list of notification events for the current item/mod/user
Definition at line 512 of file notification.php.
References $criteria, $i, $module_id, $ret, $user_id, and getObjects().

| XoopsNotificationHandler::insert | ( | & | $notification | ) |
Write a notification(subscription) to database
| object | &$notification |
: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5
Definition at line 260 of file notification.php.
Referenced by doLoginMaintenance(), subscribe(), and updateByField().

| XoopsNotificationHandler::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 422 of file notification.php.
References $criteria, $module_id, $user_id, and getCount().

| XoopsNotificationHandler::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 448 of file notification.php.
References $module_id, $user, $user_id, $xoopsModule, $xoopsUser, XoopsObjectHandler\create(), getNotification(), insert(), and updateByField().

| XoopsNotificationHandler::triggerEvent | ( | $category, | |
| $item_id, | |||
| $event, | |||
$extra_tags = array(), |
|||
$user_list = array(), |
|||
$module_id = null, |
|||
$omit_user_id = null |
|||
| ) |
Enter description here...
| int | $category | |
| int | $item_id | |
| int | $event | |
| array | $extra_tags | |
| array | $user_list | |
| int | $module_id | |
| int | $omit_user_id |
Definition at line 592 of file notification.php.
References $config_handler, $criteria, $GLOBALS, $module, $module_handler, $module_id, $user, $xoopsModule, $xoopsUser, _NOT_ITEMNAMENOTAVAILABLE, _NOT_ITEMTYPENOTAVAILABLE, _NOT_ITEMURLNOTAVAILABLE, getObjects(), notificationCategoryInfo(), notificationEventInfo(), notificationGenerateConfig(), xoops_gethandler(), XOOPS_NOTIFICATION_MODE_SENDALWAYS, XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE, and XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT.
Referenced by triggerEvents().


| XoopsNotificationHandler::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 |
| string | $event | notification event |
| 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 570 of file notification.php.
References $module_id, and triggerEvent().

| XoopsNotificationHandler::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 725 of file notification.php.
References $criteria, $module_id, $user_id, $xoopsModule, $xoopsUser, and deleteAll().

| XoopsNotificationHandler::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 779 of file notification.php.
References $criteria, $module_id, and deleteAll().

| XoopsNotificationHandler::unsubscribeByModule | ( | $module_id | ) |
Delete all notifications for a particular module
| int | $module_id | ID of the module |
Definition at line 764 of file notification.php.
References $criteria, $module_id, and deleteAll().

| XoopsNotificationHandler::unsubscribeByUser | ( | $user_id | ) |
Delete all notifications for one user
| int | $user_id | ID of the user |
Definition at line 707 of file notification.php.
References $criteria, $user_id, and deleteAll().

| XoopsNotificationHandler::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 818 of file notification.php.
References insert().
Referenced by subscribe().

