Message processor class.
More...
|
| can_send_to_any_users () |
| Returns true if message can be sent to fake/internal user as well.
|
|
| cleanup_all_notifications (int $notificationdeletetime) |
| Allow processors to perform cleanup tasks for all notifications by overriding this method.
|
|
| cleanup_read_notifications (int $notificationdeletetime) |
| Allow processors to perform cleanup tasks for read notifications by overriding this method.
|
|
| config_form ($preferences) |
| Creates necessary fields in the messaging config form.
|
|
| force_process_messages () |
| Determines if this processor should process a message regardless of user preferences or site settings.
|
|
| get_default_messaging_settings () |
| Returns the message processors default settings Should the processor be enabled in users by default? Is enabling it disallowed, permitted or forced?
|
|
| has_message_preferences () |
| Returns true if this processor has configurable message preferences.
|
|
| is_system_configured () |
| Tests whether the airnotifier settings have been configured.
|
|
| is_user_configured ($user=null) |
| Are the message processor's user specific settings configured?
|
|
| load_data (&$preferences, $userid) |
| Loads the config data from database to put on the form during initial form display.
|
|
| process_form ($form, &$preferences) |
| Parses the submitted form data and saves it into preferences array.
|
|
| send_message ($eventdata) |
| Processes the message and sends a notification via airnotifier.
|
|
|
| encrypt_payload (stdClass $payload, stdClass $devicetoken) |
| Encrypt the notification payload.
|
|
Message processor class.
- Copyright
- 2012 Jerome Mouneyrac jerom.nosp@m.e@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Since
- Moodle 2.7
- Copyright
- 2012 Jerome Mouneyrac
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ can_send_to_any_users()
message_output::can_send_to_any_users |
( |
| ) |
|
|
inherited |
Returns true if message can be sent to fake/internal user as well.
If message_output support message to be sent to fake user, then it should return true, like email.
- Return values
-
Reimplemented in message_output_email.
◆ cleanup_all_notifications()
message_output::cleanup_all_notifications |
( |
int | $notificationdeletetime | ) |
|
|
inherited |
Allow processors to perform cleanup tasks for all notifications by overriding this method.
- Since
- Moodle 3.9
- Parameters
-
int | $notificationdeletetime | |
- Return values
-
◆ cleanup_read_notifications()
message_output::cleanup_read_notifications |
( |
int | $notificationdeletetime | ) |
|
|
inherited |
Allow processors to perform cleanup tasks for read notifications by overriding this method.
- Since
- Moodle 3.9
- Parameters
-
int | $notificationdeletetime | |
- Return values
-
◆ config_form()
message_output_airnotifier::config_form |
( |
| $preferences | ) |
|
Creates necessary fields in the messaging config form.
- Parameters
-
array | $preferences | An array of user preferences |
Reimplemented from message_output.
◆ encrypt_payload()
message_output_airnotifier::encrypt_payload |
( |
stdClass | $payload, |
|
|
stdClass | $devicetoken ) |
|
protected |
Encrypt the notification payload.
- Parameters
-
stdClass | $payload | The notification payload. |
stdClass | $devicetoken | The device token record |
- Return values
-
◆ force_process_messages()
message_output::force_process_messages |
( |
| ) |
|
|
inherited |
Determines if this processor should process a message regardless of user preferences or site settings.
- Return values
-
◆ get_default_messaging_settings()
message_output::get_default_messaging_settings |
( |
| ) |
|
|
inherited |
Returns the message processors default settings Should the processor be enabled in users by default? Is enabling it disallowed, permitted or forced?
- Return values
-
int | The Default message output settings expressed as a bit mask MESSAGE_DEFAULT_ENABLED + MESSAGE_PERMITTED |
Reimplemented in message_output_email.
◆ has_message_preferences()
message_output::has_message_preferences |
( |
| ) |
|
|
inherited |
Returns true if this processor has configurable message preferences.
This is distinct from notification preferences.
- Return values
-
◆ is_system_configured()
message_output_airnotifier::is_system_configured |
( |
| ) |
|
Tests whether the airnotifier settings have been configured.
- Return values
-
boolean | true if airnotifier is configured |
Reimplemented from message_output.
◆ is_user_configured()
message_output::is_user_configured |
( |
| $user = null | ) |
|
|
inherited |
Are the message processor's user specific settings configured?
- Parameters
-
stdClass | $user | the user object, defaults to $USER. |
- Return values
-
bool | True if the user has all necessary settings in their messaging preferences |
◆ load_data()
message_output_airnotifier::load_data |
( |
& | $preferences, |
|
|
| $userid ) |
Loads the config data from database to put on the form during initial form display.
- Parameters
-
array | $preferences | preferences array |
int | $userid | the user id |
Reimplemented from message_output.
◆ process_form()
message_output_airnotifier::process_form |
( |
| $form, |
|
|
& | $preferences ) |
Parses the submitted form data and saves it into preferences array.
- Parameters
-
stdClass | $form | preferences form class |
array | $preferences | preferences array |
Reimplemented from message_output.
◆ send_message()
message_output_airnotifier::send_message |
( |
| $eventdata | ) |
|
Processes the message and sends a notification via airnotifier.
- Parameters
-
stdClass | $eventdata | the event data submitted by the message sender plus $eventdata->savedmessageid |
- Return values
-
true | if ok, false if error |
Reimplemented from message_output.
The documentation for this class was generated from the following file:
- message/output/airnotifier/message_output_airnotifier.php