Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | List of all members
message_output_jabber Class Reference

The jabber message processor. More...

Inheritance diagram for message_output_jabber:
message_output

Public Member Functions

 can_send_to_any_users ()
 Returns true if message can be sent to fake/internal user as well. More...
 
 cleanup_all_notifications (int $notificationdeletetime)
 Allow processors to perform cleanup tasks for all notifications by overriding this method. More...
 
 cleanup_read_notifications (int $notificationdeletetime)
 Allow processors to perform cleanup tasks for read notifications by overriding this method. More...
 
 config_form ($preferences)
 Creates necessary fields in the messaging config form. More...
 
 force_process_messages ()
 Determines if this processor should process a message regardless of user preferences or site settings. More...
 
 get_default_messaging_settings ()
 Returns the message processors default settings Should the processor be enabled for logged in users by default? Should the processor be enabled for logged off users by default? Is enabling it disallowed, permitted or forced? More...
 
 has_message_preferences ()
 Returns true if this processor has configurable message preferences. More...
 
 is_system_configured ()
 Tests whether the Jabber settings have been configured. More...
 
 is_user_configured ($user=null)
 Tests whether the Jabber settings have been configured on user level. More...
 
 load_data (&$preferences, $userid)
 Loads the config data from database to put on the form during initial form display. More...
 
 process_form ($form, &$preferences)
 Parses the submitted form data and saves it into preferences array. More...
 
 send_message ($eventdata)
 Processes the message and sends a notification via jabber. More...
 

Detailed Description

The jabber message processor.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ 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
bool

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
void

◆ 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
void

◆ config_form()

message_output_jabber::config_form (   $preferences)

Creates necessary fields in the messaging config form.

Parameters
array$preferencesAn array of user preferences

Reimplemented from message_output.

◆ 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
bool

◆ get_default_messaging_settings()

message_output::get_default_messaging_settings ( )
inherited

Returns the message processors default settings Should the processor be enabled for logged in users by default? Should the processor be enabled for logged off users by default? Is enabling it disallowed, permitted or forced?

Return values
intThe Default message output settings expressed as a bit mask MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF + MESSAGE_DISALLOWED|MESSAGE_PERMITTED|MESSAGE_FORCED

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
bool

◆ is_system_configured()

message_output_jabber::is_system_configured ( )

Tests whether the Jabber settings have been configured.

Return values
booleantrue if Jabber is configured

Reimplemented from message_output.

◆ is_user_configured()

message_output_jabber::is_user_configured (   $user = null)

Tests whether the Jabber settings have been configured on user level.

Parameters
object$userthe user object, defaults to $USER.
Return values
boolhas the user made all the necessary settings in their profile to allow this plugin to be used.

Reimplemented from message_output.

◆ load_data()

message_output_jabber::load_data ( $preferences,
  $userid 
)

Loads the config data from database to put on the form during initial form display.

Parameters
array$preferencespreferences array
int$useridthe user id

Reimplemented from message_output.

◆ process_form()

message_output_jabber::process_form (   $form,
$preferences 
)

Parses the submitted form data and saves it into preferences array.

Parameters
stdClass$formpreferences form class
array$preferencespreferences array

Reimplemented from message_output.

◆ send_message()

message_output_jabber::send_message (   $eventdata)

Processes the message and sends a notification via jabber.

Parameters
stdClass$eventdatathe event data submitted by the message sender plus $eventdata->savedmessageid
Return values
trueif ok, false if error

Reimplemented from message_output.


The documentation for this class was generated from the following file: