From 7d1563333ba0645382ae4aa27bdcf7158564cd5f Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Fri, 31 May 2024 12:55:06 +0100 Subject: [PATCH] MDL-82055 output: replace usage of named templatable interface. It's not available during, and breaks, site installation. The output class doesn't necessarily need it in 78db6bbce8, so switch to simple templatable interface instead. --- lib/outputcomponents.php | 15 ++------------- ...extheader.mustache => context_header.mustache} | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) rename lib/templates/{contextheader.mustache => context_header.mustache} (98%) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 6af82ec8f6a..99d22f8e21c 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -26,8 +26,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - use core\output\local\action_menu\subpanel; - use core\output\named_templatable; +use core\output\local\action_menu\subpanel; defined('MOODLE_INTERNAL') || die(); @@ -4110,7 +4109,7 @@ class tabobject implements renderable, templatable { * @copyright 2015 Adrian Greeve * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -class context_header implements renderable, named_templatable { +class context_header implements renderable, templatable { /** * @var string $heading Main heading. @@ -4232,16 +4231,6 @@ class context_header implements renderable, named_templatable { 'additionalbuttons' => $additionalbuttons ?? [], ]; } - - /** - * Get the template name. - * - * @param renderer_base $renderer Renderer. - * @return string - */ - public function get_template_name(renderer_base $renderer): string { - return 'core/contextheader'; - } } /** diff --git a/lib/templates/contextheader.mustache b/lib/templates/context_header.mustache similarity index 98% rename from lib/templates/contextheader.mustache rename to lib/templates/context_header.mustache index 69364aae1af..34ea7805f60 100644 --- a/lib/templates/contextheader.mustache +++ b/lib/templates/context_header.mustache @@ -15,7 +15,7 @@ along with Moodle. If not, see . }} {{! - @template core/contextheader + @template core/context_header Context header template.