From 731bf1cb789811a0305c46bb895025c5462f4fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikel=20Mart=C3=ADn?= Date: Tue, 11 Jun 2024 13:36:04 +0200 Subject: [PATCH] MDL-82160 renderer: Add render_context_header method to core_renderer In MDL-81597 the original render_context_header method was removed and converted to a template. That caused a regression, so this patch adds the method again but using the new template. --- lib/outputrenderers.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index a9d02b1f2e2..590f0fc4a0a 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -4644,6 +4644,17 @@ EOD; return $this->render($contextheader); } + /** + * Renders the header bar. + * + * @param context_header $contextheader Header bar object. + * @return string HTML for the header bar. + */ + protected function render_context_header(context_header $contextheader) { + $context = $contextheader->export_for_template($this); + return $this->render_from_template('core/context_header', $context); + } + /** * Renders the skip links for the page. *