|
| __construct (\Elgg\Notifications\SubscriptionsService $subscriptions,\Elgg\Queue\Queue $queue,\Elgg\PluginHooksService $hooks,\ElggSession $session) |
| Constructor. More...
|
|
| registerEvent ($type, $subtype, array $actions=array()) |
|
| unregisterEvent ($type, $subtype) |
|
| getEvents () |
| private More...
|
|
| registerMethod ($name) |
|
| unregisterMethod ($name) |
|
| getMethods () |
| private More...
|
|
| enqueueEvent ($action, $type, $object) |
| Add a notification event to the queue. More...
|
|
| processQueue ($stopTime) |
| Pull notification events from queue until stop time is reached. More...
|
|
| registerDeprecatedHandler ($method, $handler) |
| Register a deprecated notification handler. More...
|
|
| getDeprecatedHandler ($method) |
| Get a deprecated notification handler callback. More...
|
|
| getMethodsAsDeprecatedGlobal () |
| Provides a way to incrementally wean Elgg's notifications code from the global $NOTIFICATION_HANDLERS. More...
|
|
| setDeprecatedNotificationSubject ($type, $subtype, $subject) |
| Set message subject for deprecated notification code. More...
|
|
Definition at line 15 of file NotificationsService.php.
Constructor.
- Parameters
-
\Elgg\Notifications\SubscriptionsService | $subscriptions | Subscription service |
\Elgg\Queue\Queue | $queue | Queue |
\Elgg\PluginHooksService | $hooks | Plugin hook service |
\ElggSession | $session | Session service |
Definition at line 51 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::enqueueEvent |
( |
|
$action, |
|
|
|
$type, |
|
|
|
$object |
|
) |
| |
Add a notification event to the queue.
- Parameters
-
string | $action | Action name |
string | $type | Type of the object of the action |
\ElggData | $object | The object of the action |
- Returns
- void private
Definition at line 138 of file NotificationsService.php.
Is someone using the deprecated override.
- Parameters
-
\Elgg\Notifications\Event | $event | Event |
- Returns
- boolean
Definition at line 429 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::getDeprecatedHandler |
( |
|
$method | ) |
|
Get a deprecated notification handler callback.
- Parameters
-
- Returns
- callback|null
Definition at line 325 of file NotificationsService.php.
Get the notification body using a pre-Elgg 1.9 plugin hook.
- Parameters
-
\Elgg\Notifications\Notification | $notification | Notification |
\Elgg\Notifications\Event | $event | Event |
string | $method | Method |
- Returns
Definition at line 355 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::getDeprecatedNotificationSubject |
( |
|
$type, |
|
|
|
$subtype |
|
) |
| |
|
protected |
Get the deprecated subject.
- Parameters
-
string | $type | Entity type |
string | $subtype | Entity subtype |
- Returns
- string
Definition at line 404 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::getEvents |
( |
| ) |
|
Elgg\Notifications\NotificationsService::getMethods |
( |
| ) |
|
Elgg\Notifications\NotificationsService::getMethodsAsDeprecatedGlobal |
( |
| ) |
|
Provides a way to incrementally wean Elgg's notifications code from the global $NOTIFICATION_HANDLERS.
- Returns
- array
Definition at line 339 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::processQueue |
( |
|
$stopTime | ) |
|
Pull notification events from queue until stop time is reached.
- Parameters
-
int | $stopTime | The Unix time to stop sending notifications |
- Returns
- int The number of notification events handled private
Definition at line 171 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::registerDeprecatedHandler |
( |
|
$method, |
|
|
|
$handler |
|
) |
| |
Register a deprecated notification handler.
- Parameters
-
string | $method | Method name |
string | $handler | Handler callback |
- Returns
- void
Definition at line 315 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::registerEvent |
( |
|
$type, |
|
|
|
$subtype, |
|
|
array |
$actions = array() |
|
) |
| |
Elgg\Notifications\NotificationsService::registerMethod |
( |
|
$name | ) |
|
Send a notification to a subscriber.
- Parameters
-
\Elgg\Notifications\Event | $event | The notification event |
int | $guid | The guid of the subscriber |
string | $method | The notification method |
- Returns
- bool private
Definition at line 247 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::sendNotifications |
( |
|
$event, |
|
|
|
$subscriptions |
|
) |
| |
|
protected |
Sends the notifications based on subscriptions.
- Parameters
-
\Elgg\Notifications\Event | $event | Notification event |
array | $subscriptions | Subscriptions for this event |
- Returns
- int The number of notifications handled private
Definition at line 219 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::setDeprecatedNotificationSubject |
( |
|
$type, |
|
|
|
$subtype, |
|
|
|
$subject |
|
) |
| |
Set message subject for deprecated notification code.
- Parameters
-
string | $type | Entity type |
string | $subtype | Entity subtype |
string | $subject | Subject line |
- Returns
- void
Definition at line 382 of file NotificationsService.php.
Elgg\Notifications\NotificationsService::unregisterEvent |
( |
|
$type, |
|
|
|
$subtype |
|
) |
| |
Elgg\Notifications\NotificationsService::unregisterMethod |
( |
|
$name | ) |
|
Elgg\Notifications\NotificationsService::$deprHandlers = array() |
|
protected |
Elgg\Notifications\NotificationsService::$deprSubjects = array() |
|
protected |
Elgg\Notifications\NotificationsService::$events = array() |
|
protected |
Elgg\Notifications\NotificationsService::$hooks |
|
protected |
Elgg\Notifications\NotificationsService::$methods = array() |
|
protected |
Elgg\Notifications\NotificationsService::$queue |
|
protected |
Elgg\Notifications\NotificationsService::$session |
|
protected |
Elgg\Notifications\NotificationsService::$subscriptions |
|
protected |
const Elgg\Notifications\NotificationsService::QUEUE_NAME = 'notifications' |
The documentation for this class was generated from the following file: