Go to the source code of this file.
Namespaces | |
| namespace | Elgg::Core |
Activate a plugin or plugins. | |
Functions | |
| register_notification_handler ($method, $handler, $params=NULL) | |
| This function registers a handler for a given notification type (eg "email"). | |
| unregister_notification_handler ($method) | |
| This function unregisters a handler for a given notification type (eg "email"). | |
| notify_user ($to, $from, $subject, $message, array $params=NULL, $methods_override="") | |
| Notify a user via their preferences. | |
| get_user_notification_settings ($user_guid=0) | |
| Get the notification settings for a given user. | |
| set_user_notification_setting ($user_guid, $method, $value) | |
| Set a user notification pref. | |
| email_notify_handler (ElggEntity $from, ElggUser $to, $subject, $message, array $params=NULL) | |
| Send a notification via email. | |
| elgg_send_email ($from, $to, $subject, $body, array $params=NULL) | |
| Send an email to any email address. | |
| notification_init () | |
| Correctly initialise notifications and register the email handler. | |
| notification_user_settings_save () | |
| Includes the action to save user notifications. | |
| register_notification_object ($entity_type, $object_subtype, $language_name) | |
| Register an entity type and subtype to be eligible for notifications. | |
| register_notification_interest ($user_guid, $author_guid) | |
| Establish a 'notify' relationship between the user and a content author. | |
| remove_notification_interest ($user_guid, $author_guid) | |
| Remove a 'notify' relationship between the user and a content author. | |
| object_notifications ($event, $object_type, $object) | |
| Automatically triggered notification on 'create' events that looks at registered objects and attempts to send notifications to anybody who's interested. | |
Variables | |
| global | $NOTIFICATION_HANDLERS = array() |
| Notification handlers. | |
| elgg_send_email | ( | $ | from, | |
| $ | to, | |||
| $ | subject, | |||
| $ | body, | |||
| array $ | params = NULL | |||
| ) |
Send an email to any email address.
| string | $from Email address or string: "name <email>" | |
| string | $to Email address or string: "name <email>" | |
| string | $subject The subject of the message | |
| string | $body The message body | |
| array | $params Optional parameters (none used in this function) |
| NotificationException |
Definition at line 296 of file notification.php.
| email_notify_handler | ( | ElggEntity $ | from, | |
| ElggUser $ | to, | |||
| $ | subject, | |||
| $ | message, | |||
| array $ | params = NULL | |||
| ) |
Send a notification via email.
| ElggEntity | $from The from user/site/object | |
| ElggUser | $to To which user? | |
| string | $subject The subject of the message. | |
| string | $message The message body | |
| array | $params Optional parameters (none taken in this instance) |
| NotificationException | private |
Definition at line 244 of file notification.php.
| get_user_notification_settings | ( | $ | user_guid = 0 |
) |
Get the notification settings for a given user.
| int | $user_guid The user id |
Definition at line 170 of file notification.php.
| notification_init | ( | ) |
Correctly initialise notifications and register the email handler.
Definition at line 371 of file notification.php.
| notification_user_settings_save | ( | ) |
Includes the action to save user notifications.
Definition at line 388 of file notification.php.
| notify_user | ( | $ | to, | |
| $ | from, | |||
| $ | subject, | |||
| $ | message, | |||
| array $ | params = NULL, |
|||
| $ | methods_override = "" | |||
| ) |
Notify a user via their preferences.
| mixed | $to Either a guid or an array of guid's to notify. | |
| int | $from GUID of the sender, which may be a user, site or object. | |
| string | $subject Message subject. | |
| string | $message Message body. | |
| array | $params Misc additional parameters specific to various methods. | |
| mixed | $methods_override A string, or an array of strings specifying the delivery methods to use - or leave blank for delivery using the user's chosen delivery methods. |
| NotificationException |
Definition at line 88 of file notification.php.
| object_notifications | ( | $ | event, | |
| $ | object_type, | |||
| $ | object | |||
| ) |
Automatically triggered notification on 'create' events that looks at registered objects and attempts to send notifications to anybody who's interested.
| string | $event create | |
| string | $object_type mixed | |
| mixed | $object The object created |
Definition at line 461 of file notification.php.
| register_notification_handler | ( | $ | method, | |
| $ | handler, | |||
| $ | params = NULL | |||
| ) |
This function registers a handler for a given notification type (eg "email").
| string | $method The method | |
| string | $handler The handler function, in the format "handler(ElggEntity $from, ElggUser $to, $subject, $message, array $params = NULL)". This function should return false on failure, and true/a tracking message ID on success. | |
| array | $params An associated array of other parameters for this handler defining some properties eg. supported msg length or rich text support. |
Definition at line 38 of file notification.php.
| register_notification_interest | ( | $ | user_guid, | |
| $ | author_guid | |||
| ) |
Establish a 'notify' relationship between the user and a content author.
| int | $user_guid The GUID of the user who wants to follow a user's content | |
| int | $author_guid The GUID of the user whose content the user wants to follow |
Definition at line 432 of file notification.php.
| register_notification_object | ( | $ | entity_type, | |
| $ | object_subtype, | |||
| $ | language_name | |||
| ) |
Register an entity type and subtype to be eligible for notifications.
| string | $entity_type The type of entity | |
| string | $object_subtype Its subtype | |
| string | $language_name Its localized notification string (eg "New blog post") |
Definition at line 403 of file notification.php.
| remove_notification_interest | ( | $ | user_guid, | |
| $ | author_guid | |||
| ) |
Remove a 'notify' relationship between the user and a content author.
| int | $user_guid The GUID of the user who is following a user's content | |
| int | $author_guid The GUID of the user whose content the user wants to unfollow |
Definition at line 444 of file notification.php.
| set_user_notification_setting | ( | $ | user_guid, | |
| $ | method, | |||
| $ | value | |||
| ) |
Set a user notification pref.
| int | $user_guid The user id. | |
| string | $method The delivery method (eg. email) | |
| bool | $value On(true) or off(false). |
Definition at line 211 of file notification.php.
| unregister_notification_handler | ( | $ | method | ) |
This function unregisters a handler for a given notification type (eg "email").
| string | $method The method |
Definition at line 65 of file notification.php.
| $NOTIFICATION_HANDLERS = array() |
Notification handlers.
Definition at line 22 of file notification.php.
1.6.3