Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
tool_lp\page_helper Class Reference

Page helper. More...

Static Public Member Functions

static setup_for_competency ($pagecontextid, moodle_url $url, $framework, $competency=null, $parent=null)
 Set-up a competency page.
 
static setup_for_course (moodle_url $url, $course, $subtitle='')
 Set-up a course page.
 
static setup_for_framework ($id, $pagecontextid, $framework=null, $returntype=null)
 Set-up a framework page.
 
static setup_for_plan ($userid, moodle_url $url, $plan=null, $subtitle='', $returntype=null)
 Set-up a plan page.
 
static setup_for_template ($pagecontextid, moodle_url $url, $template=null, $subtitle='', $returntype=null)
 Set-up a template page.
 
static setup_for_user_evidence ($userid, moodle_url $url, $evidence=null, $subtitle='', $returntype=null)
 Set-up a user evidence page.
 

Detailed Description

Page helper.

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

Member Function Documentation

◆ setup_for_competency()

static tool_lp\page_helper::setup_for_competency ( $pagecontextid,
moodle_url $url,
$framework,
$competency = null,
$parent = null )
static

Set-up a competency page.

Example: list($title, $subtitle) = page_helper\setup_for_competency($pagecontextid, $url, $competency, $pagetitle); echo $OUTPUT->heading($title); echo $OUTPUT->heading($subtitle, 3);

Parameters
int$pagecontextidThe page context ID.
moodle_url$urlThe current page.
core_competency\competency_framework$frameworkThe competency framework.
core_competency\competency$competencyThe competency, if any.
core_competency\competency$parentThe parent competency, if any.
Return values
arrayWith the following:
  • Page title
  • Page sub title
  • Return URL (main competencies page)
Exceptions
coding_exception

◆ setup_for_course()

static tool_lp\page_helper::setup_for_course ( moodle_url $url,
$course,
$subtitle = '' )
static

Set-up a course page.

Example: list($title, $subtitle) = page_helper\setup_for_course($pagecontextid, $url, $course, $pagetitle); echo $OUTPUT->heading($title); echo $OUTPUT->heading($subtitle, 3);

Parameters
moodle_url$urlThe current page.
stdClass$courseThe course.
string$subtitleThe title of the subpage, if any.
Return values
arrayWith the following:
  • Page title
  • Page sub title
  • Return URL (course competencies page)

◆ setup_for_framework()

static tool_lp\page_helper::setup_for_framework ( $id,
$pagecontextid,
$framework = null,
$returntype = null )
static

Set-up a framework page.

Example: list($pagetitle, $pagesubtitle, $url, $frameworksurl) = page_helper\setup_for_framework($id, $pagecontextid); echo $OUTPUT->heading($pagetitle); echo $OUTPUT->heading($pagesubtitle, 3);

Parameters
int$idThe framework ID.
int$pagecontextidThe page context ID.
core_competency\competency_framework$frameworkThe framework.
string$returntypeThe desired return page.
Return values
arrayWith the following:

◆ setup_for_plan()

static tool_lp\page_helper::setup_for_plan ( $userid,
moodle_url $url,
$plan = null,
$subtitle = '',
$returntype = null )
static

Set-up a plan page.

Example: list($title, $subtitle) = page_helper\setup_for_plan($url, $template, $pagetitle); echo $OUTPUT->heading($title); echo $OUTPUT->heading($subtitle, 3);

Parameters
int$useridThe user ID.
moodle_url$urlThe current page.
core_competency\plan$planThe plan, if any.
string$subtitleThe title of the subpage, if any.
string$returntypeThe desired return page.
Return values
arrayWith the following:
  • Page title
  • Page sub title
  • Return URL (main plan page)

◆ setup_for_template()

static tool_lp\page_helper::setup_for_template ( $pagecontextid,
moodle_url $url,
$template = null,
$subtitle = '',
$returntype = null )
static

Set-up a template page.

Example: list($title, $subtitle) = page_helper\setup_for_template($pagecontextid, $url, $template, $pagetitle); echo $OUTPUT->heading($title); echo $OUTPUT->heading($subtitle, 3);

Parameters
int$pagecontextidThe page context ID.
moodle_url$urlThe current page.
core_competency\template$templateThe template, if any.
string$subtitleThe title of the subpage, if any.
string$returntypeThe desired return page.
Return values
arrayWith the following:

◆ setup_for_user_evidence()

static tool_lp\page_helper::setup_for_user_evidence ( $userid,
moodle_url $url,
$evidence = null,
$subtitle = '',
$returntype = null )
static

Set-up a user evidence page.

Example: list($title, $subtitle) = page_helper\setup_for_user_evidence($url, $template, $pagetitle); echo $OUTPUT->heading($title); echo $OUTPUT->heading($subtitle, 3);

Parameters
int$useridThe user ID.
moodle_url$urlThe current page.
core_competency\user_evidence$evidenceThe user evidence, if any.
string$subtitleThe title of the subpage, if any.
string$returntypeThe desired return page.
Return values
arrayWith the following:
  • Page title
  • Page sub title
  • Return URL (main plan page)

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