Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 280 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_renderer:: (5 methods):
  edit_button()
  navbar()
  context_header()
  render_context_header()
  firstview_fakeblocks()


Class: core_renderer  - X-Ref

Renderers to align Moodle's HTML with that expected by Bootstrap

edit_button(moodle_url $url, string $method = 'post')   X-Ref
Returns HTML to display a "Turn editing on/off" button in a form.

return: string HTML the button
param: moodle_url $url The URL + params to send through when clicking the button
param: string $method

navbar()   X-Ref
Renders the "breadcrumb" for all pages in boost.

return: string the HTML for the navbar.

context_header($headerinfo = null, $headinglevel = 1)   X-Ref
Renders the context header for the page.

return: string A rendered context header.
param: array $headerinfo Heading information.
param: int $headinglevel What 'h' level to make the heading.

render_context_header(\context_header $contextheader)   X-Ref
Renders the header bar.

return: string HTML for the header bar.
param: context_header $contextheader Header bar object.

firstview_fakeblocks()   X-Ref
See if this is the first view of the current cm in the session if it has fake blocks.

(We track up to 100 cms so as not to overflow the session.)
This is done for drawer regions containing fake blocks so we can show blocks automatically.

return: boolean true if the page has fakeblocks and this is the first visit.