| Elgg
    Version 6.3
    | 
Go to the source code of this file.
| Functions | |
| elgg_register_notification_event (string $object_type, string $object_subtype, array $actions=[], string $handler=NotificationEventHandler::class) | |
| Register a notification event.  More... | |
| elgg_unregister_notification_event (string $object_type, string $object_subtype, array $actions=[]) | |
| Unregister a notification event.  More... | |
| elgg_register_notification_method (string $name) | |
| Register a delivery method for notifications.  More... | |
| elgg_get_notification_methods () | |
| Returns registered delivery methods for notifications  [ 'email' => 'email', 'sms' => 'sms', ] More... | |
| elgg_unregister_notification_method (string $name) | |
| Unregister a delivery method for notifications.  More... | |
| elgg_get_notification_events () | |
| Get the registered notification events in the format.  More... | |
| elgg_get_subscriptions_for_container (int $container_guid) | |
| Get the subscriptions for the content created inside this container.  More... | |
| elgg_send_email (\Elgg\Email $email) | |
| Send an email to any email address.  More... | |
| elgg_enqueue_notification_event (string $action, \ElggData $object, ?\ElggEntity $actor=null) | |
| Enqueue a notification event for delivery.  More... | |
| elgg_notify_user (\ElggUser $recipient, string $action, \ElggData $subject, array $params=[], ?\ElggEntity $from=null) | |
| Notify a user about a given action on a subject.  More... | |
| elgg_enqueue_notification_event | ( | string | $action, | 
| \ElggData | $object, | ||
| ?\ElggEntity | $actor = null | ||
| ) | 
Enqueue a notification event for delivery.
Only use this function if the default event based queueing can't be used.
| string | $action | the action of the notification event | 
| \ElggData | $object | the object used in the notification event | 
| null | \ElggEntity | $actor | (optional) the actor of the notification event (default: logged-in user or owner of $object) | 
Definition at line 202 of file notification.php.
| elgg_get_notification_events | ( | ) | 
Get the registered notification events in the format.
array ( <type> => array ( <subtype> => array ( <action1>, <action2>, ) ) )
Definition at line 153 of file notification.php.
| elgg_get_notification_methods | ( | ) | 
Returns registered delivery methods for notifications  [ 'email' => 'email', 'sms' => 'sms', ]  
Definition at line 121 of file notification.php.
| elgg_get_subscriptions_for_container | ( | int | $container_guid | ) | 
Get the subscriptions for the content created inside this container.
The return array is of the form:
array( <user guid> => array('email', 'sms', 'ajax'), );
| int | $container_guid | GUID of the entity acting as a container | 
Definition at line 171 of file notification.php.
| elgg_notify_user | ( | \ElggUser | $recipient, | 
| string | $action, | ||
| \ElggData | $subject, | ||
| array | $params = [], | ||
| ?\ElggEntity | $from = null | ||
| ) | 
Notify a user about a given action on a subject.
| \ElggUser | $recipient | The recipient user | 
| string | $action | The action on $subject | 
| \ElggData | $subject | The notification subject | 
| array | $params | Additional params use $params['methods_override'] to override the recipient notification methods (eg 'email' or 'site') | 
| null | \ElggEntity | $from | Sender of the message | 
Definition at line 219 of file notification.php.
| elgg_register_notification_event | ( | string | $object_type, | 
| string | $object_subtype, | ||
| array | $actions = [], | ||
| string | $handler = NotificationEventHandler::class | ||
| ) | 
Register a notification event.
Elgg sends notifications for the items that have been registered with this function. For example, if you want notifications to be sent when a bookmark has been created or updated, call the function like this:
   elgg_register_notification_event('object', 'bookmarks', array('create', 'update'));
 | string | $object_type | 'object', 'user', 'group', 'site' | 
| string | $object_subtype | The subtype or name of the entity | 
| array | $actions | Array of actions or empty array for the action event. An event is usually described by the first string passed to elgg_trigger_event(). Examples include 'create', 'update', and 'publish'. The default is 'create'. | 
| string | $handler | NotificationEventHandler classname | 
Definition at line 73 of file notification.php.
| elgg_register_notification_method | ( | string | $name | ) | 
Register a delivery method for notifications.
Register for the 'send', 'notification:[method name]' event to handle sending a notification. A notification object is in the params array for the event with the key 'notification'. See \Elgg\Notifications\Notification.
| string | $name | The notification method name | 
Definition at line 105 of file notification.php.
| elgg_send_email | ( | \Elgg\Email | ) | 
Send an email to any email address.
| \Elgg\Email | 
Definition at line 185 of file notification.php.
| elgg_unregister_notification_event | ( | string | $object_type, | 
| string | $object_subtype, | ||
| array | $actions = [] | ||
| ) | 
Unregister a notification event.
| string | $object_type | 'object', 'user', 'group', 'site' | 
| string | $object_subtype | The type of the entity | 
| array | $actions | The notification action to unregister, leave empty for all actions. Example ('create', 'delete', 'publish') | 
Definition at line 88 of file notification.php.
| elgg_unregister_notification_method | ( | string | $name | ) | 
Unregister a delivery method for notifications.
| string | $name | The notification method name | 
Definition at line 134 of file notification.php.