mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-55942 core_message: moved added functionality from message/lib.php
This commit is contained in:
parent
c598f278ca
commit
79f6c36c12
9 changed files with 629 additions and 556 deletions
|
@ -224,7 +224,7 @@ class core_message_renderer extends plugin_renderer_base {
|
|||
public function render_user_notification_preferences($user) {
|
||||
$processors = get_message_processors();
|
||||
$providers = message_get_providers_for_user($user->id);
|
||||
$preferences = get_all_message_preferences($processors, $providers, $user);
|
||||
$preferences = \core_message\api::get_all_message_preferences($processors, $providers, $user);
|
||||
$notificationlistoutput = new \core_message\output\preferences\notification_list($processors, $providers, $preferences, $user);
|
||||
|
||||
return $this->render_from_template('message/preferences_notifications_list', $notificationlistoutput->export_for_template($this));
|
||||
|
@ -250,7 +250,7 @@ class core_message_renderer extends plugin_renderer_base {
|
|||
$providers = array_filter(message_get_providers_for_user($user->id), function($provider) {
|
||||
return $provider->component === 'moodle';
|
||||
});
|
||||
$preferences = get_all_message_preferences($readyprocessors, $providers, $user);
|
||||
$preferences = \core_message\api::get_all_message_preferences($readyprocessors, $providers, $user);
|
||||
$notificationlistoutput = new \core_message\output\preferences\message_notification_list($readyprocessors, $providers, $preferences, $user);
|
||||
$context = $notificationlistoutput->export_for_template($this);
|
||||
$context['blocknoncontacts'] = get_user_preferences('message_blocknoncontacts', '', $user->id) ? true : false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue