Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402]
Typical crappy helper class with tiny functions.
Copyright: | 2017 David Monllao {@link http://www.davidmonllao.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 158 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
helper:: (5 methods):
class_to_option()
option_to_class()
set_navbar()
reset_page()
prediction_context_selector()
class_to_option($class) X-Ref |
Converts a class full name to a select option key param: string $class return: string |
option_to_class($option) X-Ref |
option_to_class param: string $option return: string |
set_navbar(string $title, \moodle_url $url, ?\context $context = null) X-Ref |
Sets an analytics > analytics models > $title breadcrumb. param: string $title param: \moodle_url $url param: \context|null $context Defaults to context_system return: null |
reset_page() X-Ref |
Resets the current page. Note that this function can only be used by analytics pages that work at the system context. return: null |
prediction_context_selector(array $contexts, \moodle_url $url, \renderer_base $output,?int $selected = null, ?bool $includeall = false, ?bool $shortentext = true) X-Ref |
Convert a list of contexts to an associative array where the value is the context name. param: array $contexts param: \moodle_url $url param: \renderer_base $output param: int|null $selected param: bool $includeall param: bool $shortentext return: \stdClass |