Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

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

(no description)

File Size: 278 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.