Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

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

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: 0 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?

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

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

param: int $notificationdeletetime
return: void

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

param: int $notificationdeletetime
return: void