Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Public Attributes | List of all members
tool_usertours\helper Class Reference

Tour helper. More...

Static Public Member Functions

static bootstrap ()
 Handle addition of the tour into the current page.
 
static bootstrap_reset ()
 Add the reset link to the current page.
 
static count_tours ()
 Return the count of all tours. More...
 
static format_icon_link ($url, $icon, $alt, $iconcomponent='moodle', $options=array())
 Get a filler icon for display in the actions column of a table. More...
 
static get_all_filters ()
 Get a list of all possible filters. More...
 
static get_delete_step_link ($stepid)
 Get the link for deleting steps. More...
 
static get_delete_tour_link ($tourid)
 Get the link used to delete the tour. More...
 
static get_duplicate_tour_link ($tourid)
 Get the link used to duplicate the tour. More...
 
static get_edit_step_link ($tourid, $stepid=null, $targettype=null)
 Get the link to edit the step. More...
 
static get_edit_tour_link ($tourid=null)
 Get the link used to edit the tour. More...
 
static get_export_tour_link ($tourid)
 Get the link used to export the tour. More...
 
static get_filler_icon ($options=array())
 Get a filler icon for display in the actions column of a table. More...
 
static get_import_tour_link ()
 Get the link used to import the tour. More...
 
static get_list_tour_link ()
 Get the link for listing tours. More...
 
static get_move_step_link ($stepid, $direction=self::MOVE_DOWN)
 Get the link to move the step. More...
 
static get_move_tour_link ($tourid, $direction=self::MOVE_DOWN)
 Get the link to move the tour. More...
 
static get_new_step_link ($tourid, $targettype=null)
 Get the link ot create a new step. More...
 
static get_reset_tour_for_all_link ($tourid)
 Get the link used to reset the tour state for all users. More...
 
static get_step ($stepid)
 Fetch the specified step. More...
 
static get_step_from_sortorder ($tourid, $sortorder)
 Fetch the step with the specified sortorder. More...
 
static get_steps ($tourid)
 Get all of the steps in the tour. More...
 
static get_tour ($tourid)
 Get the specified tour. More...
 
static get_tour_from_sortorder ($sortorder)
 Fetch the tour with the specified sortorder. More...
 
static get_tours ()
 Get all of the tours. More...
 
static get_view_tour_link ($tourid)
 Get the link used to view the tour. More...
 
static render_stepname_inplace_editable (step $step)
 Render the inplace editable used to edit the step name. More...
 
static render_tourdescription_inplace_editable (tour $tour)
 Render the inplace editable used to edit the tour description. More...
 
static render_tourenabled_inplace_editable (tour $tour)
 Render the inplace editable used to edit the tour enable state. More...
 
static render_tourname_inplace_editable (tour $tour)
 Render the inplace editable used to edit the tour name. More...
 
static reset_tour_sortorder ()
 Reset the sortorder for all tours.
 

Public Attributes

MOVE_DOWN const MOVE_DOWN = 1
 
MOVE_UP const MOVE_UP = -1
 

Detailed Description

Tour helper.

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

Member Function Documentation

◆ count_tours()

static tool_usertours\helper::count_tours ( )
static

Return the count of all tours.

Return values
int

◆ format_icon_link()

static tool_usertours\helper::format_icon_link (   $url,
  $icon,
  $alt,
  $iconcomponent = 'moodle',
  $options = array() 
)
static

Get a filler icon for display in the actions column of a table.

Parameters
string$urlThe URL for the icon.
string$iconThe icon identifier.
string$altThe alt text for the icon.
string$iconcomponentThe icon component.
array$optionsDisplay options.
Return values
string

◆ get_all_filters()

static tool_usertours\helper::get_all_filters ( )
static

Get a list of all possible filters.

Return values
array

◆ get_delete_step_link()

static tool_usertours\helper::get_delete_step_link (   $stepid)
static

Get the link for deleting steps.

Parameters
int$stepidThe ID of the step to display.
Return values
moodle_urlThe URL.

◆ get_delete_tour_link()

static tool_usertours\helper::get_delete_tour_link (   $tourid)
static

Get the link used to delete the tour.

Parameters
int$touridThe ID of the tour to delete.
Return values
moodle_urlThe URL.

◆ get_duplicate_tour_link()

static tool_usertours\helper::get_duplicate_tour_link (   $tourid)
static

Get the link used to duplicate the tour.

Parameters
int$touridThe ID of the tour to duplicate.
Return values
moodle_urlThe URL.

◆ get_edit_step_link()

static tool_usertours\helper::get_edit_step_link (   $tourid,
  $stepid = null,
  $targettype = null 
)
static

Get the link to edit the step.

If no stepid is specified, then a link to create a new step is provided. The $targettype must be specified in this case.

Parameters
int$touridThe tour that the step belongs to.
int$stepidThe step ID.
int$targettypeThe type of step.
Return values
moodle_url

◆ get_edit_tour_link()

static tool_usertours\helper::get_edit_tour_link (   $tourid = null)
static

Get the link used to edit the tour.

Parameters
int$touridThe ID of the tour to edit.
Return values
moodle_urlThe URL.

◆ get_export_tour_link()

static tool_usertours\helper::get_export_tour_link (   $tourid)
static

Get the link used to export the tour.

Parameters
int$touridThe ID of the tour to export.
Return values
moodle_urlThe URL.

◆ get_filler_icon()

static tool_usertours\helper::get_filler_icon (   $options = array())
static

Get a filler icon for display in the actions column of a table.

Parameters
array$optionsDisplay options.
Return values
string

◆ get_import_tour_link()

static tool_usertours\helper::get_import_tour_link ( )
static

Get the link used to import the tour.

Return values
moodle_urlThe URL.

◆ get_list_tour_link()

static tool_usertours\helper::get_list_tour_link ( )
static

Get the link for listing tours.

Return values
moodle_urlThe URL.

◆ get_move_step_link()

static tool_usertours\helper::get_move_step_link (   $stepid,
  $direction = self::MOVE_DOWN 
)
static

Get the link to move the step.

Parameters
int$stepidThe step ID.
int$directionThe direction to move in
Return values
moodle_url

◆ get_move_tour_link()

static tool_usertours\helper::get_move_tour_link (   $tourid,
  $direction = self::MOVE_DOWN 
)
static

Get the link to move the tour.

Parameters
int$touridThe tour ID.
int$directionThe direction to move in
Return values
moodle_url

◆ get_new_step_link()

static tool_usertours\helper::get_new_step_link (   $tourid,
  $targettype = null 
)
static

Get the link ot create a new step.

Parameters
int$touridThe ID of the tour to attach this step to.
int$targettypeThe type of target.
Return values
moodle_urlThe required URL.

◆ get_reset_tour_for_all_link()

static tool_usertours\helper::get_reset_tour_for_all_link (   $tourid)
static

Get the link used to reset the tour state for all users.

Parameters
int$touridThe ID of the tour to display.
Return values
moodle_urlThe URL.

◆ get_step()

static tool_usertours\helper::get_step (   $stepid)
static

Fetch the specified step.

Parameters
int$stepidThe id of the step to fetch.
Return values
step

◆ get_step_from_sortorder()

static tool_usertours\helper::get_step_from_sortorder (   $tourid,
  $sortorder 
)
static

Fetch the step with the specified sortorder.

Parameters
int$touridThe tour that the step belongs to.
int$sortorderThe sortorder of the step.
Return values
step

◆ get_steps()

static tool_usertours\helper::get_steps (   $tourid)
static

Get all of the steps in the tour.

Parameters
int$touridThe tour that the step belongs to.
Return values
stdClass[]

◆ get_tour()

static tool_usertours\helper::get_tour (   $tourid)
static

Get the specified tour.

Parameters
int$touridThe tour that the step belongs to.
Return values
stdClass

◆ get_tour_from_sortorder()

static tool_usertours\helper::get_tour_from_sortorder (   $sortorder)
static

Fetch the tour with the specified sortorder.

Parameters
int$sortorderThe sortorder of the tour.
Return values
tour

◆ get_tours()

static tool_usertours\helper::get_tours ( )
static

Get all of the tours.

Return values
stdClass[]

◆ get_view_tour_link()

static tool_usertours\helper::get_view_tour_link (   $tourid)
static

Get the link used to view the tour.

Parameters
int$touridThe ID of the tour to display.
Return values
moodle_urlThe URL.

◆ render_stepname_inplace_editable()

static tool_usertours\helper::render_stepname_inplace_editable ( step  $step)
static

Render the inplace editable used to edit the step name.

Parameters
step$stepThe step to edit.
Return values
string

◆ render_tourdescription_inplace_editable()

static tool_usertours\helper::render_tourdescription_inplace_editable ( tour  $tour)
static

Render the inplace editable used to edit the tour description.

Parameters
tour$tourThe tour to edit.
Return values
string

◆ render_tourenabled_inplace_editable()

static tool_usertours\helper::render_tourenabled_inplace_editable ( tour  $tour)
static

Render the inplace editable used to edit the tour enable state.

Parameters
tour$tourThe tour to edit.
Return values
string

◆ render_tourname_inplace_editable()

static tool_usertours\helper::render_tourname_inplace_editable ( tour  $tour)
static

Render the inplace editable used to edit the tour name.

Parameters
tour$tourThe tour to edit.
Return values
string

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