프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |
메소드 | 설명 | |
---|---|---|
__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 ) |
메소드 | 설명 | |
---|---|---|
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 |
메소드 | 설명 | |
---|---|---|
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 |
리턴 |
public getMethodsAsDeprecatedGlobal ( ) : array | ||
리턴 | 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 |
리턴 | integer | array | The number of notification events handled, or a delivery matrix |
[
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 |
리턴 | boolean |
[
25 => [
'email' => true,
'sms' => false,
],
55 => [],
]
protected SubscriptionsService,Elgg\Notifications $subscriptions | ||
리턴 |