From 9bd3228d69b6786efb4e89f6c0956b07ce82fc33 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 7 Mar 2024 11:24:59 +0800 Subject: [PATCH] MDL-81144 core: Standardise init of standard_head_html_prepend hook --- .../hook/output/before_standard_head_html_generation.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/classes/hook/output/before_standard_head_html_generation.php b/lib/classes/hook/output/before_standard_head_html_generation.php index 4a2e99ac9b4..1021830c028 100644 --- a/lib/classes/hook/output/before_standard_head_html_generation.php +++ b/lib/classes/hook/output/before_standard_head_html_generation.php @@ -27,13 +27,21 @@ namespace core\hook\output; #[\core\attribute\label('Allows plugins to add any elements to the page <head> html tag.')] #[\core\attribute\hook\replaces_callbacks('before_standard_html_head')] final class before_standard_head_html_generation { + /** + * Hook to allow subscribers to add HTML content to page head tag. + * + * @param renderer_base $renderer + * @param string $output Initial output + */ public function __construct( /** @var \renderer_base The core_renderer instance used for the generation */ public readonly \renderer_base $renderer, + /** @var string The collected output */ private string $output = '', ) { } + /** * Plugins implementing callback can add any HTML to the page. *