Property | Type | Description | |
---|---|---|---|
$methods | Array of strings. Delivery names as registered with elgg_register_notification_method() |
Property | Type | Description | |
---|---|---|---|
$db |
Method | Description | |
---|---|---|
__construct ( |
Constructor | |
addSubscription ( integer $userGuid, string $method, integer $targetGuid ) : boolean | Subscribe a user to notifications about a target entity | |
getSubscriptions ( Elgg\Notifications\NotificationEvent $event ) : array | Get the subscriptions for this notification event | |
getSubscriptionsForContainer ( integer $container_guid ) : array | Get the subscriptions for the content created inside this container. | |
removeSubscription ( integer $userGuid, string $method, integer $targetGuid ) : boolean | Unsubscribe a user to notifications about a target entity |
Method | Description | |
---|---|---|
getMethodRelationships ( ) : array | Get the relationship names for notifications | |
getSubscriptionRecords ( integer $container_guid ) : array | Get subscription records from the database |
public __construct ( |
||
$db | Database object | |
$methods | array | Notification delivery method names |
protected getMethodRelationships ( ) : array | ||
return | array |
protected getSubscriptionRecords ( integer $container_guid ) : array | ||
$container_guid | integer | The GUID of the subscription target |
return | array |
public getSubscriptions ( Elgg\Notifications\NotificationEvent $event ) : array | ||
$event | Elgg\Notifications\NotificationEvent | Notification event |
return | array |
public getSubscriptionsForContainer ( integer $container_guid ) : array | ||
$container_guid | integer | GUID of the entity acting as a container |
return | array | User GUIDs (keys) and their subscription types (values). |
public removeSubscription ( integer $userGuid, string $method, integer $targetGuid ) : boolean | ||
$userGuid | integer | The GUID of the user to unsubscribe to notifications |
$method | string | The delivery method of the notifications to stop |
$targetGuid | integer | The entity to stop receiving notifications about |
return | boolean |