MDL-81144 core: Standardise init of standard_head_html_prepend hook

This commit is contained in:
Andrew Nicols 2024-03-07 11:24:59 +08:00
parent 305248f41d
commit 9bd3228d69
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14

View File

@ -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.
*