| extends | XoopsObjectHandler | 
|---|
XOOPS notification handler class.
This class is responsible for providing data access mechanisms to the data source of XOOPS notification class objects.
| Methods | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 
					
	public
					
					
				 | create(bool $isNew = true): XoopsNotification
		Create a {@link XoopsNotification}
	 Create a {@link XoopsNotification} Parameters
 Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | get(int $id): XoopsNotification|false
		Retrieve a {@link XoopsNotification}
	 Retrieve a {@link XoopsNotification} Parameters
 Returns{@link XoopsNotification}, false on fail Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | insert(XoopsObject|XoopsNotification $notification): bool
		Write a notification(subscription) to database
	 Write a notification(subscription) to database Parameters
 Returnstrue on success, otherwise false Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | delete(XoopsObject|XoopsNotification $notification): bool
		Delete a {@link XoopsNotification} from the database
	 Delete a {@link XoopsNotification} from the database Parameters
 Returnstrue on success, otherwise false Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | getObjects(CriteriaElement|CriteriaCompo $criteria = null, bool $id_as_key = false): array
		Get some {@link XoopsNotification}s
	 Get some {@link XoopsNotification}s Parameters
 ReturnsArray of {@link XoopsNotification} objects | # | ||||||||||||
| 
					
	public
					
					
				 | getCount(CriteriaElement|CriteriaCompo $criteria = null): int
		Count Notifications
	 Count Notifications Parameters
 ReturnsCount | # | ||||||||||||
| 
					
	public
					
					
				 | deleteAll(CriteriaElement|CriteriaCompo $criteria = null): bool
		Delete multiple notifications
	 Delete multiple notifications Parameters
 | # | ||||||||||||
| 
					
	public
					
					&
				 | getNotification($module_id, $category, $item_id, $event, $user_id): bool | # | ||||||||||||
| 
					
	public
					
					
				 | isSubscribed(string $category, int $item_id, string $event, int $module_id, int $user_id): int
		Determine if a user is subscribed to a particular event in
a particular module.
	 Determine if a user is subscribed to a particular event in a particular module. Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | subscribe(
	string $category,
	int $item_id,
	mixed $events,
	int $mode = null,
	int $module_id = null,
	int $user_id = null,
): bool
		Subscribe for notification for an event(s)
	 Subscribe for notification for an event(s) Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | getByUser(int $user_id): array
		Get a list of notifications by user ID
	 Get a list of notifications by user ID Parameters
 ReturnsArray of {@link XoopsNotification} objects | # | ||||||||||||
| 
					
	public
					
					
				 | getSubscribedEvents($category, $item_id, $module_id, $user_id): array
		Get a list of notification events for the current item/mod/user
	 Get a list of notification events for the current item/mod/user | # | ||||||||||||
| 
					
	public
					
					
				 | getByItemId(int $module_id, int $item_id, string $order = null, int $mode = null): array
		Retrieve items by their ID
	 Retrieve items by their ID Parameters
 ReturnsArray of {@link XoopsNotification} objects | # | ||||||||||||
| 
					
	public
					
					
				 | triggerEvent(
	string $category,
	int $item_id,
	string $event,
	array $extra_tags = [],
	array $user_list = [],
	int $module_id = null,
	int $omit_user_id = null,
): mixed
		Trigger a single notification event
	 Trigger a single notification event | # | ||||||||||||
| 
					
	public
					
					
				 | unsubscribeByUser(int $user_id): bool
		Delete all notifications for one user
	 Delete all notifications for one user Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | unsubscribe(string $category, int $item_id, mixed $events, int $module_id = null, int $user_id = null): bool
		Unsubscribe notifications for an event(s).
	 Unsubscribe notifications for an event(s). Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | unsubscribeByModule(int $module_id): bool
		Delete all notifications for a particular module
	 Delete all notifications for a particular module Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | unsubscribeByItem(int $module_id, string $category, int $item_id): bool
		Delete all subscriptions for a particular item.
	 Delete all subscriptions for a particular item. Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | doLoginMaintenance(int $user_id)
		Perform notification maintenance activites at login time.
In particular, any notifications for the newly logged-in
user…
	 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. Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | updateByField(XoopsNotification $notification, string $field_name, mixed $field_value): bool
		Update
	 Update Parameters
 | # | ||||||||||||
| Methods inherited from XoopsObjectHandler | 
|---|
| __construct(), XoopsObjectHandler(),  | 
| Properties inherited from XoopsObjectHandler | 
|---|
| $db |