Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

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