|
XOOPS
2.6.0
|

Public Member Functions | |
| __construct (Connection $db=null) | |
| doLoginMaintenance ($user_id) | |
| getByItemId ($module_id, $item_id, $order=null, $status=null) | |
| getByUser ($user_id) | |
| getNotification ($module_id, $category, $item_id, $event, $user_id) | |
| getObjectsArray (CriteriaElement $criteria=null, $id_as_key=false) | |
| getSubscribedEvents ($category, $item_id, $module_id, $user_id) | |
| 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 (NotificationsNotification $notification, $field_name, $field_value) | |
Public Member Functions inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler | |
| __call ($name, $args) | |
| cleanOrphan ($table_link= '', $field_link= '', $field_object= '') | |
| create ($isNew=true) | |
| delete (XoopsObject $object, $force=false) | |
| deleteAll (CriteriaElement $criteria, $force=true, $asObject=false) | |
| deleteByLink (CriteriaElement $criteria=null) | |
| get ($id=null, $fields=null) | |
| getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true) | |
| getByLink (CriteriaElement $criteria=null, $fields=null, $asObject=true, $field_link=null, $field_object=null) | |
| getCount (CriteriaElement $criteria=null) | |
| getCountByLink (CriteriaElement $criteria=null) | |
| getCounts (CriteriaElement $criteria=null) | |
| getCountsByLink (CriteriaElement $criteria=null) | |
| getIds (CriteriaElement $criteria=null) | |
| getList (CriteriaElement $criteria=null, $limit=0, $start=0) | |
| getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true) | |
| insert (XoopsObject $object, $force=true) | |
| loadHandler ($name, $args=null) | |
| setHandler ($handler=null, $args=null, $path=null) | |
| synchronization ($table_link= '', $field_link= '', $field_object= '') | |
| updateAll ($fieldname, $fieldvalue, CriteriaElement $criteria, $force=false) | |
| updateByLink ($data, CriteriaElement $criteria=null) | |
Public Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler | |
| create () | |
| delete (XoopsObject $object, $force=true) | |
| get ($int_id) | |
| insert (XoopsObject $object, $force=true) | |
Additional Inherited Members | |
Public Attributes inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler | |
| $className | |
| $field_link | |
| $field_object | |
| $identifierName | |
| $keyName | |
| $keyName_link | |
| $table | |
| $table_link | |
Public Attributes inherited from Xoops\Core\Kernel\XoopsObjectHandler | |
| $db2 | |
Protected Member Functions inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler | |
| __construct (Connection $db=null, $table= '', $className= '', $keyName= '', $identifierName= '') | |
Protected Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler | |
| __construct (Connection $db=null) | |
Protected Attributes inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler | |
| $handler | |
Definition at line 137 of file notification.php.
| NotificationsNotificationHandler::__construct | ( | Connection | $db = null | ) |
Constructor
| Connection | null | $db | Connection |
Definition at line 144 of file notification.php.
| NotificationsNotificationHandler::doLoginMaintenance | ( | $user_id | ) |
Perform notification maintenance activites at login time. In particular, any notifications for the newly logged-in user with mode NOTIFICATIONS_MODE_WAITFORLOGIN are switched to mode NOTIFICATIONS_MODE_SENDONCETHENWAIT.
| int | $user_id | ID of the user being logged in |
Definition at line 616 of file notification.php.
References $criteria, $user_id, getObjectsArray(), and Xoops\Core\Kernel\XoopsPersistableObjectHandler\insert().

| NotificationsNotificationHandler::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 |
| int | $status | status |
Definition at line 356 of file notification.php.
References $criteria, $module_id, $status, and getObjectsArray().

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

| NotificationsNotificationHandler::getNotification | ( | $module_id, | |
| $category, | |||
| $item_id, | |||
| $event, | |||
| $user_id | |||
| ) |
getNotification
| int | $module_id | module |
| string | $category | category |
| int | $item_id | item |
| string | $event | event |
| int | $user_id | user |
rename this
Also, should we have get by module, get by category, etc...??
Definition at line 197 of file notification.php.
References $criteria, $module_id, $user_id, and getObjectsArray().
Referenced by subscribe().


| NotificationsNotificationHandler::getObjectsArray | ( | CriteriaElement | $criteria = null, |
$id_as_key = false |
|||
| ) |
Get some NotificationsNotifications
| CriteriaElement | null | $criteria | criteria object |
| bool | $id_as_key | Use IDs as keys into the array? |
Definition at line 157 of file notification.php.
References $criteria, and $result.
Referenced by doLoginMaintenance(), getByItemId(), getByUser(), getNotification(), getSubscribedEvents(), and triggerEvent().

| NotificationsNotificationHandler::getSubscribedEvents | ( | $category, | |
| $item_id, | |||
| $module_id, | |||
| $user_id | |||
| ) |
Get a list of notification events for the current item/mod/user
| string | $category | caategory |
| int | $item_id | id |
| int | $module_id | module |
| int | $user_id | user |
Definition at line 326 of file notification.php.
References $criteria, $module_id, $result, $user_id, and getObjectsArray().

| NotificationsNotificationHandler::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) |
Definition at line 225 of file notification.php.
References $criteria, $module_id, $user_id, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getCount().

| NotificationsNotificationHandler::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 253 of file notification.php.
References $module_id, $user, $user_id, $xoops, Xoops\Core\Kernel\XoopsObjectHandler\create(), Xoops\getInstance(), getNotification(), Xoops\Core\Kernel\XoopsPersistableObjectHandler\insert(), and updateByField().

| NotificationsNotificationHandler::triggerEvent | ( | $category, | |
| $item_id, | |||
| $event, | |||
$extra_tags = array(), |
|||
$user_list = array(), |
|||
$module_id = null, |
|||
$omit_user_id = null |
|||
| ) |
triggerEvent
| int | $category | notification category |
| int | $item_id | ID of the item |
| int | $event | notification event |
| array | $extra_tags | array of substitutions for template |
| array | $user_list | users to notify |
| int | $module_id | module |
| int | $omit_user_id | users to not notify |
Definition at line 421 of file notification.php.
References $criteria, $helper, $module, $module_id, $user, $xoops, _MD_NOTIFICATIONS_ITEMNAMENOTAVAILABLE, _MD_NOTIFICATIONS_ITEMTYPENOTAVAILABLE, _MD_NOTIFICATIONS_ITEMURLNOTAVAILABLE, XoopsBaseConfig\get(), Notifications\getInstance(), and getObjectsArray().
Referenced by triggerEvents().


| NotificationsNotificationHandler::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 | $events | 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 391 of file notification.php.
References $module_id, and triggerEvent().

| NotificationsNotificationHandler::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 544 of file notification.php.
References $criteria, $module_id, $user_id, $xoops, Xoops\Core\Kernel\XoopsPersistableObjectHandler\deleteAll(), and Xoops\getInstance().

| NotificationsNotificationHandler::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 597 of file notification.php.
References $criteria, $module_id, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\deleteAll().

| NotificationsNotificationHandler::unsubscribeByModule | ( | $module_id | ) |
Delete all notifications for a particular module
| int | $module_id | ID of the module |
Definition at line 582 of file notification.php.
References $criteria, $module_id, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\deleteAll().

| NotificationsNotificationHandler::unsubscribeByUser | ( | $user_id | ) |
Delete all notifications for one user
| int | $user_id | ID of the user |
Definition at line 525 of file notification.php.
References $criteria, $user_id, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\deleteAll().

| NotificationsNotificationHandler::updateByField | ( | NotificationsNotification | $notification, |
| $field_name, | |||
| $field_value | |||
| ) |
Update
| NotificationsNotification | $notification | NotificationsNotification object |
| string | $field_name | Name of the field |
| mixed | $field_value | Value to write |
Definition at line 639 of file notification.php.
References Xoops\Core\Kernel\XoopsPersistableObjectHandler\insert(), Xoops\Core\Kernel\XoopsObject\setVar(), and Xoops\Core\Kernel\XoopsObject\unsetNew().
Referenced by subscribe().

