Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Notifications
InstantNotificationEventHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Notifications
;
4
10
final
class
InstantNotificationEventHandler
extends
NotificationEventHandler
{
11
15
public
function
getSubscriptions
(): array {
16
$subscriptions
= [];
17
18
$methods_override = (array)
elgg_extract
(
'methods_override'
, $this->params, []);
19
$recipients = (array)
elgg_extract
(
'recipients'
, $this->params, []);
20
21
foreach
($recipients as
$user
) {
22
if
(!empty($methods_override)) {
23
$subscriptions
[$user->guid] = $methods_override;
24
continue
;
25
}
26
27
// get user default preferences
28
$subscriptions
[$user->guid] = array_keys(array_filter($user->getNotificationSettings()));
29
}
30
31
return
$subscriptions
;
32
}
33
37
protected
function
addMuteLink
(): bool {
38
return
false
;
39
}
40
}
Elgg\Notifications\InstantNotificationEventHandler\addMuteLink
addMuteLink()
Definition:
InstantNotificationEventHandler.php:37
Elgg\Notifications\InstantNotificationEventHandler
Notification Event Handler for instant notifications.
Definition:
InstantNotificationEventHandler.php:10
elgg_extract
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition:
elgglib.php:254
Elgg\Notifications\NotificationEventHandler
Notification Event Handler handles preparation of a notification.
Definition:
NotificationEventHandler.php:14
$user
$user
Definition:
ban.php:7
Elgg\Notifications
Definition:
CreateCommentEventHandler.php:3
$subscriptions
if(empty($methods)) $subscriptions
Definition:
subscriptions.php:18
Elgg\Notifications\InstantNotificationEventHandler\getSubscriptions
getSubscriptions()
Definition:
InstantNotificationEventHandler.php:15
Generated on Sat Dec 21 2024 00:02:52 for Elgg by
1.8.11