class page_support

internal  
 

Utility functions for admin pages, navigation, and system setup.

Methods

static void
set_context(context $context)

Sets the current page context.

static void
set_pagelayout(string $layout)

Sets the page layout.

static void
set_title(string $title)

Sets the page title.

static void
set_heading(string $heading)

Sets the page heading.

static void
set_url(moodle_url $url)

Sets the page URL.

static void
navbar_add(string $text, null|moodle_url|string $action = null)

Adds an item to the navigation bar.

static renderer_base
get_renderer(string $component)

Retrieves a renderer for a specific component.

static void
admin_load_navigation(string $section, int $jump = 2, bool $ignoreactive = true)

Loads admin navigation for a specific section.

static void
admin_externalpage_setup(string $section)

Performs setup for an admin external page.

static void
page_markdown(string $content, moodle_url|string $url, string $title, context|null $context = null)

Renders a simple page with Markdown content.

Details

at line 42
static void set_context(context $context)

Sets the current page context.

Parameters

context $context

Context object

Return Value

void

at line 53
static void set_pagelayout(string $layout)

Sets the page layout.

Parameters

string $layout

The layout name (e.g., 'admin', 'standard').

Return Value

void

at line 64
static void set_title(string $title)

Sets the page title.

Parameters

string $title

Page title

Return Value

void

at line 75
static void set_heading(string $heading)

Sets the page heading.

Parameters

string $heading

Page heading

Return Value

void

at line 86
static void set_url(moodle_url $url)

Sets the page URL.

Parameters

moodle_url $url

Page URL object

Return Value

void

at line 98
static void navbar_add(string $text, null|moodle_url|string $action = null)

Adds an item to the navigation bar.

Parameters

string $text

item label

null|moodle_url|string $action

item action URL

Return Value

void

at line 111
static renderer_base get_renderer(string $component)

Retrieves a renderer for a specific component.

Parameters

string $component

component name

Return Value

renderer_base

renderer instance

at line 125
static void admin_load_navigation(string $section, int $jump = 2, bool $ignoreactive = true)

Loads admin navigation for a specific section.

Parameters

string $section

admin section identifier

int $jump

number of path elements to skip

bool $ignoreactive

whether to ignore the active node

Return Value

void

at line 155
static void admin_externalpage_setup(string $section)

Performs setup for an admin external page.

Parameters

string $section

admin section identifier

Return Value

void

at line 171
static void page_markdown(string $content, moodle_url|string $url, string $title, context|null $context = null)

Renders a simple page with Markdown content.

Parameters

string $content

Markdown content

moodle_url|string $url

Page URL

string $title

Page title

context|null $context

Page context (default: system)

Return Value

void