interface view_adapter_interface

Interface for View rendering.

Abstracts Moodle's $PAGE and $OUTPUT.

Methods

void
set_title(string $title)

Set the page title.

void
set_heading(string $heading)

Set the page heading.

void
set_layout(string $layout)

Set the page layout (e.g., 'admin', 'standard').

void
add_breadcrumb(string $text, mixed $url = null)

Add a navigation node to the breadcrumbs.

string
render_template(string $template_name, array $data = [])

Render a template with data.

string
render_page(string $content)

Render raw HTML as a full page.

Details

at line 33
void set_title(string $title)

Set the page title.

Parameters

string $title

Return Value

void

at line 40
void set_heading(string $heading)

Set the page heading.

Parameters

string $heading

Return Value

void

at line 47
void set_layout(string $layout)

Set the page layout (e.g., 'admin', 'standard').

Parameters

string $layout

Return Value

void

at line 55
void add_breadcrumb(string $text, mixed $url = null)

Add a navigation node to the breadcrumbs.

Parameters

string $text
mixed $url

Return Value

void

at line 65
string render_template(string $template_name, array $data = [])

Render a template with data.

Parameters

string $template_name

mustache template name (component/name)

array $data

template data

Return Value

string

the rendered HTML

at line 74
string render_page(string $content)

Render raw HTML as a full page.

Parameters

string $content

Return Value

string

the full page HTML