From 7f7638209992119975b9f6f4a0e16a40975c263c Mon Sep 17 00:00:00 2001 From: Philipp Memmel Date: Wed, 29 May 2024 13:12:32 +0000 Subject: [PATCH] MBS-9021: Move hook_callbacks.php to local namespace --- classes/{ => local}/hook_callbacks.php | 3 ++- db/hooks.php | 2 +- lib.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename classes/{ => local}/hook_callbacks.php (98%) diff --git a/classes/hook_callbacks.php b/classes/local/hook_callbacks.php similarity index 98% rename from classes/hook_callbacks.php rename to classes/local/hook_callbacks.php index 581fb64..df54af1 100644 --- a/classes/hook_callbacks.php +++ b/classes/local/hook_callbacks.php @@ -23,11 +23,12 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -namespace mod_learningmap; +namespace mod_learningmap\local; use cache; use core\hook\output\before_http_headers; use Exception; +use mod_learningmap\cachemanager; /** * Hook callbacks for mod_learningmap. diff --git a/db/hooks.php b/db/hooks.php index 83ddf94..a3bb795 100644 --- a/db/hooks.php +++ b/db/hooks.php @@ -27,6 +27,6 @@ $callbacks = [ [ 'hook' => core\hook\output\before_http_headers::class, - 'callback' => \mod_learningmap\hook_callbacks::class . '::inject_backlinks_into_activity_header', + 'callback' => \mod_learningmap\local\hook_callbacks::class . '::inject_backlinks_into_activity_header', ], ]; diff --git a/lib.php b/lib.php index e62ab6b..ece307e 100644 --- a/lib.php +++ b/lib.php @@ -330,7 +330,7 @@ function learningmap_reset_userdata($data) { * Generate "back to map" buttons in activities linked to from the learning map. * * Needs to be completely removed as soon as we do not support moodle 4.3 and below anymore. The logic has been moved to - * {@see \mod_learningmap\hook_callbacks::inject_backlinks_into_activity_header} from moodle 4.4 on. + * {@see \mod_learningmap\local\hook_callbacks::inject_backlinks_into_activity_header} from moodle 4.4 on. * * @return void */