Skip to content

Commit

Permalink
MBS-9021: Move hook_callbacks.php to local namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
PhMemmel committed May 29, 2024
1 parent 6c5f770 commit 7f76382
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion db/hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
];
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 7f76382

Please sign in to comment.