mirror of
https://github.com/moodle/moodle.git
synced 2025-02-26 13:03:53 +01:00
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.
This commit is contained in:
parent
ad7fc69c25
commit
3b419c4540
7
.upgradenotes/MDL-82160-2024061112162023.yml
Normal file
7
.upgradenotes/MDL-82160-2024061112162023.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
issueNumber: MDL-82160
|
||||||
|
notes:
|
||||||
|
theme:
|
||||||
|
- message: >-
|
||||||
|
The method `core_renderer::render_context_header` has been deprecated
|
||||||
|
please use core_renderer::render($contextheader) instead
|
||||||
|
type: deprecated
|
@ -4601,6 +4601,20 @@ EOD;
|
|||||||
return $this->render($contextheader);
|
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.
|
* Renders the skip links for the page.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user