Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]

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: 146 lines (5 kb)
Included or required:0 times
Referenced: 4 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 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: 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