Notification Event Handler handles preparation of a notification.
More...
Notification Event Handler handles preparation of a notification.
- Since
- 4.0
Definition at line 14 of file NotificationEventHandler.php.
Elgg\Notifications\NotificationEventHandler::addMuteLink |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::deliverNotification |
( |
Notification |
$notification, |
|
|
string |
$method |
|
) |
| |
|
finalprotected |
Elgg\Notifications\NotificationEventHandler::excludeContainerSubscribers |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::excludeEntitySubscribers |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::excludeOwnerSubscribers |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::filterMutedSubscriptions |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::getEventActor |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::getEventEntity |
( |
| ) |
|
|
protected |
Elgg\Notifications\NotificationEventHandler::getMethods |
( |
| ) |
|
|
final |
Elgg\Notifications\NotificationEventHandler::getNotificationBody |
( |
\ElggUser |
$recipient, |
|
|
string |
$method |
|
) |
| |
|
protected |
Get body for the notification.
Plugin can define a subtype specific body simply by providing a translation for the string "notification:<action>:<type>:<subtype>:body".
The arguments passed into the translation are:
- Recipient's name
- Name of the user who triggered the notification
- Title of the content
- Name of the content's container
- The actual content (entity's 'description' field)
- URL to the content
Argument swapping can be used to change the order of the parameters. See http://php.net/manual/en/function.sprintf.php#example-5427
- Parameters
-
\ElggUser | $recipient | Notification recipient |
string | $method | Method |
- Returns
- string Notification body in the recipient's language
Definition at line 406 of file NotificationEventHandler.php.
Elgg\Notifications\NotificationEventHandler::getNotificationSubject |
( |
\ElggUser |
$recipient, |
|
|
string |
$method |
|
) |
| |
|
protected |
Get subject for the notification.
Plugins can define a subtype specific subject simply by providing a translation for the string "notification:<action>:<type>:<subtype>:subject".
- Parameters
-
\ElggUser | $recipient | Notification recipient |
string | $method | Method |
- Returns
- string Notification subject in the recipient's language
Definition at line 367 of file NotificationEventHandler.php.
Elgg\Notifications\NotificationEventHandler::getNotificationSubsciptionExclusionGUIDs |
( |
| ) |
|
|
finalprotected |
Elgg\Notifications\NotificationEventHandler::getNotificationSummary |
( |
\ElggUser |
$recipient, |
|
|
string |
$method |
|
) |
| |
|
protected |
Elgg\Notifications\NotificationEventHandler::getNotificationURL |
( |
\ElggUser |
$recipient, |
|
|
string |
$method |
|
) |
| |
|
protected |
Elgg\Notifications\NotificationEventHandler::getSubscriptions |
( |
| ) |
|
static Elgg\Notifications\NotificationEventHandler::isConfigurableByUser |
( |
| ) |
|
|
static |
static Elgg\Notifications\NotificationEventHandler::isConfigurableForEntity |
( |
\ElggEntity |
$entity | ) |
|
|
staticfinal |
Can this event be configured for a specific entity.
For example this can be based on a group tools option which is enabled or not
- Parameters
-
\ElggEntity | $entity | the entity to check for |
- Returns
- bool
- Since
- 4.1
Definition at line 502 of file NotificationEventHandler.php.
static Elgg\Notifications\NotificationEventHandler::isConfigurableForGroup |
( |
\ElggGroup |
$group | ) |
|
|
staticprotected |
Can this event be configured for a specific group.
For example this can be based on a group tools option which is enabled or not
- Parameters
-
\ElggGroup | $group | the group to check for |
- Returns
- bool
- Since
- 4.1
Definition at line 534 of file NotificationEventHandler.php.
static Elgg\Notifications\NotificationEventHandler::isConfigurableForUser |
( |
\ElggUser |
$user | ) |
|
|
staticprotected |
Can this event be configured for a specific user.
- Parameters
-
\ElggUser | $user | the user to check for |
- Returns
- bool
- Since
- 4.1
Definition at line 520 of file NotificationEventHandler.php.
Elgg\Notifications\NotificationEventHandler::prepareNotification |
( |
array |
$params | ) |
|
|
finalprotected |
Elgg\Notifications\NotificationEventHandler::prepareSubscriptions |
( |
| ) |
|
|
finalprotected |
Elgg\Notifications\NotificationEventHandler::send |
( |
| ) |
|
|
final |
Elgg\Notifications\NotificationEventHandler::sendNotification |
( |
int |
$guid, |
|
|
string |
$method, |
|
|
array |
$params = [] |
|
) |
| |
|
finalprotected |
Send a notification to a subscriber.
- Parameters
-
int | $guid | The guid of the subscriber |
string | $method | The notification method |
array | $params | Default notification params |
- Returns
- bool
Definition at line 234 of file NotificationEventHandler.php.
Elgg\Notifications\NotificationEventHandler::sendNotifications |
( |
array |
$subscriptions, |
|
|
array |
$params = [] |
|
) |
| |
|
finalprotected |
Sends the notifications based on subscriptions.
Returns an array in the form: [ 25 => [ 'email' => true, 'sms' => false, ], 55 => [], ]
- Parameters
-
array | $subscriptions | Subscriptions for this event |
array | $params | Default notification parameters |
- Returns
- array
Definition at line 190 of file NotificationEventHandler.php.
Elgg\Notifications\NotificationEventHandler::$event |
|
protected |
Elgg\Notifications\NotificationEventHandler::$params = [] |
|
protected |
Elgg\Notifications\NotificationEventHandler::$service |
|
protected |
The documentation for this class was generated from the following file: