Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 401 and 402] [Versions 401 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.

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

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.

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

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

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

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.