Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400]

Contains a base class for extension by message processors

Copyright: Luis Rodrigues
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 145 lines (5 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class


Class: message_output  - X-Ref

Base message processor class for extension by message processors

is_system_configured()   X-Ref
Are the message processor's system settings configured?

return: bool True if all necessary config settings been entered

is_user_configured($user = null)   X-Ref
Are the message processor's user specific settings configured?

return: bool True if the user has all necessary settings in their messaging preferences
param: stdClass $user the user object, defaults to $USER.

get_default_messaging_settings()   X-Ref
Returns the message processors default settings
Should the processor be enabled in users by default?
Is enabling it disallowed, permitted or forced?

return: int The Default message output settings expressed as a bit mask

can_send_to_any_users()   X-Ref
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: bool

has_message_preferences()   X-Ref
Returns true if this processor has configurable message preferences. This is
distinct from notification preferences.

return: bool

force_process_messages()   X-Ref
Determines if this processor should process a message regardless of user preferences or site settings.

return: bool

cleanup_all_notifications(int $notificationdeletetime)   X-Ref
Allow processors to perform cleanup tasks for all notifications by overriding this method

return: void
param: int $notificationdeletetime

cleanup_read_notifications(int $notificationdeletetime)   X-Ref
Allow processors to perform cleanup tasks for read notifications by overriding this method

return: void
param: int $notificationdeletetime