Commit bf97f707 authored by Paul Holden's avatar Paul Holden
Browse files

MDL-67338 message: re-implement block page type patterns.

The `page_type_list` method for the message component was deprecated
in 5b0769db as part of MDL-54744. However it is still required when
trying to configure blocks on any messaging pages.
parent 3610f1ee
......@@ -151,6 +151,7 @@ $string['on'] = 'On';
$string['online'] = 'Online';
$string['otherparticipants'] = 'Other participants';
$string['outputnotavailable'] = 'Not available';
$string['page-message-x'] = 'Any message pages';
$string['participants'] = 'Participants';
$string['pendingcontactrequests'] = 'There are {$a} pending contact requests';
$string['permitted'] = 'Permitted';
......
......@@ -2338,13 +2338,6 @@ function message_mark_messages_read() {
'\core_message\api::mark_all_messages_as_read() instead.');
}
/**
* @deprecated since Moodle 3.2
*/
function message_page_type_list() {
throw new coding_exception('message_page_type_list() can not be used anymore.');
}
/**
* @deprecated since Moodle 3.2
*/
......
......@@ -530,6 +530,20 @@ function translate_message_default_setting($plugindefault, $processorname) {
return array($permitted, $loggedin, $loggedoff);
}
/**
* Return a list of page types
*
* @param string $pagetype current page type
* @param context|null $parentcontext Block's parent context
* @param context|null $currentcontext Current context of block
* @return array
*/
function message_page_type_list(string $pagetype, ?context $parentcontext, ?context $currentcontext): array {
return [
'message-*' => get_string('page-message-x', 'message'),
];
}
/**
* Get messages sent or/and received by the specified users.
* Please note that this function return deleted messages too. Besides, only individual conversation messages
......
This files describes API changes in /message/ messaging system,
information provided here is intended especially for developers.
=== 3.11.2 ===
* The `message_page_type_list` method was previouly deprecated, however it was still
used so has been recreated in message/lib.php
=== 3.10 ===
* The following methods have been deprecated and should not be used any more:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment