Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_competency\url Class Reference

URL manager class. More...

Public Member Functions

 templates ($pagecontextid)
 The URL where the templates can be found.
 

Static Public Member Functions

static competency ($competencyid, $pagecontextid)
 The URL where the competency can be found.
 
static framework ($frameworkid, $pagecontextid)
 The URL where the framework can be found.
 
static frameworks ($pagecontextid)
 The URL where the frameworks can be found.
 
static plan ($planid)
 The URL where the plan can be found.
 
static plans ($userid)
 The URL where the plans of a user can be found.
 
static template ($templateid, $pagecontextid)
 The URL where the template can be found.
 
static user_competency ($usercompetencyid)
 The URL where the user competency can be found.
 
static user_competency_in_course ($userid, $competencyid, $courseid)
 The URL where the user competency can be found in the context of a course.
 
static user_competency_in_plan ($userid, $competencyid, $planid)
 The URL where the user competency can be found in the context of a plan.
 
static user_evidence ($userevidenceid)
 The URL where the user evidence (of prior learning) can be found.
 

Static Protected Member Functions

static get ($resource, $args)
 Defer to the resolver.
 

Static Protected Attributes

static url_resolver $resolver
 The URL resolver instance.
 

Detailed Description

URL manager class.

This class has to be used to get the URL to a resource, this allows for different alternate frontends to be used without resorting to core hacks. Note that you do not have to use this when you are navigating between pages of your own plugin.

To set another resolver, set the following config value in config.php: $CFG->core_competency_url_resolver = 'your_plugin::::your_url_resolver_class';

Your URL resolver should implement the same methods as the ones listed in this class (except for self::get()}) but not statically.

/!:: Note, resolvers MUST NEVER assume that the resource, or the resources represented by the arguments, still exist.

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

Member Function Documentation

◆ competency()

static core_competency\url::competency ( $competencyid,
$pagecontextid )
static

The URL where the competency can be found.

Parameters
int$competencyidThe competency ID.
int$pagecontextidThe ID of the context we are in.
Return values
moodle_url

◆ framework()

static core_competency\url::framework ( $frameworkid,
$pagecontextid )
static

The URL where the framework can be found.

Parameters
int$frameworkidThe framework ID.
int$pagecontextidThe ID of the context we are in.
Return values
moodle_url

◆ frameworks()

static core_competency\url::frameworks ( $pagecontextid)
static

The URL where the frameworks can be found.

Parameters
int$pagecontextidThe ID of the context that we are browsing.
Return values
moodle_url

◆ get()

static core_competency\url::get ( $resource,
$args )
staticprotected

Defer to the resolver.

Parameters
string$resourceThe resource type.
array$argsThe arguments.
Return values
mixed

◆ plan()

static core_competency\url::plan ( $planid)
static

The URL where the plan can be found.

Parameters
int$planidThe plan ID.
Return values
moodle_url

◆ plans()

static core_competency\url::plans ( $userid)
static

The URL where the plans of a user can be found.

Parameters
int$useridThe user ID.
Return values
moodle_url

◆ template()

static core_competency\url::template ( $templateid,
$pagecontextid )
static

The URL where the template can be found.

Parameters
int$templateidThe template ID.
int$pagecontextidThe ID of the context we are in.
Return values
moodle_url

◆ templates()

core_competency\url::templates ( $pagecontextid)

The URL where the templates can be found.

Parameters
int$pagecontextidThe ID of the context that we are browsing.
Return values
moodle_url

◆ user_competency()

static core_competency\url::user_competency ( $usercompetencyid)
static

The URL where the user competency can be found.

Parameters
int$usercompetencyidThe user competency ID
Return values
moodle_url

◆ user_competency_in_course()

static core_competency\url::user_competency_in_course ( $userid,
$competencyid,
$courseid )
static

The URL where the user competency can be found in the context of a course.

Parameters
int$useridThe user ID
int$competencyidThe competency ID.
int$courseidThe course ID.
Return values
moodle_url

◆ user_competency_in_plan()

static core_competency\url::user_competency_in_plan ( $userid,
$competencyid,
$planid )
static

The URL where the user competency can be found in the context of a plan.

Parameters
int$useridThe user ID
int$competencyidThe competency ID.
int$planidThe plan ID.
Return values
moodle_url

◆ user_evidence()

static core_competency\url::user_evidence ( $userevidenceid)
static

The URL where the user evidence (of prior learning) can be found.

Parameters
int$userevidenceidThe user evidence ID
Return values
moodle_url

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