MDL-82183 output: Move render_context_header()

* With \core_renderer in lib/outputrenderers.php moved to its
standalone class in \core\output, the method ::render_context_header()
introduced in MDL-82160 also needs to be moved to the new class.
This commit is contained in:
Jun Pataleta 2024-06-27 09:02:11 +08:00
parent e84daab7dd
commit 85a83eb365
No known key found for this signature in database
GPG Key ID: F83510526D99E2C7
2 changed files with 16 additions and 2 deletions

View File

@ -2,6 +2,6 @@ issueNumber: MDL-82160
notes:
theme:
- message: >-
The method `core_renderer::render_context_header` has been deprecated
please use core_renderer::render($contextheader) instead
The method `\core\output\core_renderer::render_context_header` has been deprecated
please use `\core\output\core_renderer::render($contextheader)` instead
type: deprecated

View File

@ -4153,6 +4153,20 @@ EOD;
return $this->render($contextheader);
}
/**
* Renders the header bar.
*
* @param context_header $contextheader Header bar object.
* @return string HTML for the header bar.
* @deprecated since 4.5 Please use core_renderer::render($contextheader) instead
* @todo MDL-82163 This will be deleted in Moodle 6.0.
*/
#[\core\attribute\deprecated('core_renderer::render($contextheader)', since: '4.5', mdl: 'MDL-82160')]
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.
*