mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-64417 message: allow processors to run their own cleanup tasks.
This commit is contained in:
parent
788dfb9c7d
commit
db8bda61a3
3 changed files with 42 additions and 5 deletions
|
@ -121,7 +121,26 @@ abstract class message_output {
|
|||
public function force_process_messages() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow processors to perform cleanup tasks for all notifications by overriding this method
|
||||
*
|
||||
* @since Moodle 3.9
|
||||
* @param int $notificationdeletetime
|
||||
* @return void
|
||||
*/
|
||||
public function cleanup_all_notifications(int $notificationdeletetime): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow processors to perform cleanup tasks for read notifications by overriding this method
|
||||
*
|
||||
* @since Moodle 3.9
|
||||
* @param int $notificationdeletetime
|
||||
* @return void
|
||||
*/
|
||||
public function cleanup_read_notifications(int $notificationdeletetime): void {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ This files describes API changes in /message/ messaging system,
|
|||
information provided here is intended especially for developers.
|
||||
|
||||
=== 3.9 ===
|
||||
|
||||
* Removed the following deprecated functions:
|
||||
- message_move_userfrom_unread2read
|
||||
- message_get_blocked_users
|
||||
|
@ -9,7 +10,10 @@ information provided here is intended especially for developers.
|
|||
- message_mark_message_read
|
||||
- message_can_delete_message
|
||||
- message_delete_message
|
||||
* mark_all_read_for_user()
|
||||
- mark_all_read_for_user()
|
||||
* Message processors can implement the following methods which will be executed as part of the messaging cleanup task:
|
||||
- cleanup_all_notifications
|
||||
- cleanup_read_notifications
|
||||
|
||||
=== 3.8 ===
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue