Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_analytics\output\helper Class Reference

Helper class with general purpose tiny functions. More...

Static Public Member Functions

static class_to_option ($class)
 Converts a class full name to a select option key.
 
static option_to_class ($option)
 option_to_class
 
static prediction_context_selector (array $contexts, moodle_url $url, renderer_base $output, ?int $selected=null, ?bool $includeall=false, ?bool $shortentext=true)
 Convert a list of contexts to an associative array where the value is the context name.
 
static reset_page ()
 Resets the current page.
 
static set_navbar (string $title, moodle_url $url, ?\context $context=null)
 Sets an analytics > analytics models > $title breadcrumb.
 

Detailed Description

Helper class with general purpose tiny functions.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ class_to_option()

static tool_analytics\output\helper::class_to_option ( $class)
static

Converts a class full name to a select option key.

Parameters
string$class
Return values
string

◆ option_to_class()

static tool_analytics\output\helper::option_to_class ( $option)
static

option_to_class

Parameters
string$option
Return values
string

◆ prediction_context_selector()

static tool_analytics\output\helper::prediction_context_selector ( array $contexts,
moodle_url $url,
renderer_base $output,
?int $selected = null,
?bool $includeall = false,
?bool $shortentext = true )
static

Convert a list of contexts to an associative array where the value is the context name.

Parameters
array$contexts
moodle_url$url
renderer_base$output
int | null$selected
bool$includeall
bool$shortentext
Return values
stdClass

◆ reset_page()

static tool_analytics\output\helper::reset_page ( )
static

Resets the current page.

Note that this function can only be used by analytics pages that work at the system context.

Return values
null

◆ set_navbar()

static tool_analytics\output\helper::set_navbar ( string $title,
moodle_url $url,
?\context $context = null )
static

Sets an analytics > analytics models > $title breadcrumb.

Parameters
string$title
moodle_url$url
context | null$contextDefaults to context_system
Return values
null

The documentation for this class was generated from the following file: