Свойство | Type | Description | |
---|---|---|---|
$deprHandlers | Deprecated notification handlers | ||
$deprSubjects | Deprecated message subjects | ||
$entities | |||
$events | Registered notification events | ||
$hooks | |||
$logger | |||
$methods | Registered notification methods | ||
$queue | Elgg\Queue\Queue | ||
$session | ElggSessio\ElggSession | ||
$subscriptions | |||
$translator |
Méthode | Description | |
---|---|---|
__construct ( |
Constructor | |
enqueueEvent ( string $action, string $type, ElggDat\ElggData $object ) : void | Add a notification event to the queue | |
getDeprecatedHandler ( string $method ) : callback | null | Get a deprecated notification handler callback | |
getEvents ( ) | ||
getMethods ( ) | ||
getMethodsAsDeprecatedGlobal ( ) : array | Provides a way to incrementally wean Elgg's notifications code from the global $NOTIFICATION_HANDLERS | |
processQueue ( integer $stopTime, boolean $matrix = false ) : integer | array | Pull notification events from queue until stop time is reached | |
registerDeprecatedHandler ( string $method, string $handler ) : void | Register a deprecated notification handler | |
registerEvent ( $type, $subtype, array $actions = [] ) | ||
registerMethod ( $name ) | ||
sendInstantNotifications ( ElggEntity $sender, array $recipients = [], array $params = [] ) : array | Notify a user via their preferences. | |
setDeprecatedNotificationSubject ( string $type, string $subtype, string $subject ) : void | Set message subject for deprecated notification code | |
unregisterEvent ( $type, $subtype ) | ||
unregisterMethod ( $name ) |
Méthode | Description | |
---|---|---|
getDeprecatedNotificationBody ( |
Get the notification body using a pre-Elgg 1.9 plugin hook | |
getDeprecatedNotificationSubject ( string $type, string $subtype ) : string | Get the deprecated subject | |
sendNotification ( Elgg\Notifications\NotificationEvent $event, integer $guid, string $method, array $params = [] ) : boolean | Send a notification to a subscriber | |
sendNotifications ( Elgg\Notifications\NotificationEvent $event, array $subscriptions, array $params = [] ) : array | Sends the notifications based on subscriptions |
Méthode | Description | |
---|---|---|
getNotificationBody ( Elgg\Notifications\NotificationEvent $event, ElggUse\ElggUser $recipient ) : string | Get body for the notification | |
getNotificationSubject ( Elgg\Notifications\NotificationEvent $event, ElggUse\ElggUser $recipient ) : string | Get subject for the notification |
public __construct ( |
||
$subscriptions | Subscription service | |
$queue | Elgg\Queue\Queue | Queue |
$hooks | Plugin hook service | |
$session | ElggSessio\ElggSession | Session service |
$translator | Translator | |
$entities | Entity table | |
$logger | Logger |
protected getDeprecatedNotificationBody ( |
||
$notification | Notification | |
$event | Elgg\Notifications\NotificationEvent | Event |
$method | string | Method |
Résultat |
public getMethodsAsDeprecatedGlobal ( ) : array | ||
Résultat | array |
public processQueue ( integer $stopTime, boolean $matrix = false ) : integer | array | ||
$stopTime | integer | The Unix time to stop sending notifications |
$matrix | boolean | If true, will return delivery matrix instead of a notifications event count |
Résultat | integer | array | The number of notification events handled, or a delivery matrix |
public registerEvent ( $type, $subtype, array $actions = [] ) | ||
$actions | array |
[
25 => [
'email' => true,
'sms' => false,
],
55 => [],
]
protected sendNotification ( Elgg\Notifications\NotificationEvent $event, integer $guid, string $method, array $params = [] ) : boolean | ||
$event | Elgg\Notifications\NotificationEvent | The notification event |
$guid | integer | The guid of the subscriber |
$method | string | The notification method |
$params | array | Default notification params |
Résultat | boolean |
[
25 => [
'email' => true,
'sms' => false,
],
55 => [],
]
protected EntityTable,Elgg\Database $entities | ||
Résultat |
protected PluginHooksService,Elgg $hooks | ||
Résultat |
protected ElggSession,ElggSessio $session | ||
Résultat | ElggSessio\ElggSession |
protected SubscriptionsService,Elgg\Notifications $subscriptions | ||
Résultat |