Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Step class. More...
Public Member Functions | |
add_config_field_to_form (\MoodleQuickForm $mform, $key) | |
Add the specified step field configuration to the form. More... | |
add_config_to_form (\MoodleQuickForm $mform) | |
Add the step configuration to the form. More... | |
get_config ($key=null, $default=null) | |
Get the value of the specified configuration item. More... | |
get_content () | |
Get the body content of the step. More... | |
get_delete_link () | |
Get the delete link for this step. More... | |
get_edit_link () | |
Get the edit link for this step. More... | |
get_id () | |
Get the ID of the step. More... | |
get_movedown_link () | |
Get the link to move this step down in the sortorder. More... | |
get_moveup_link () | |
Get the link to move this step up in the sortorder. More... | |
get_placement_options () | |
Get the list of possible placement options. More... | |
get_sortorder () | |
Get the current sortorder for this step. More... | |
get_target () | |
Get the target instance for this step. More... | |
get_targettype () | |
Get the content value for this step. More... | |
get_targetvalue () | |
Get the target value for this step. More... | |
get_title () | |
Get the Title of the step. More... | |
get_tour () | |
Get the Tour instance that this step belongs to. More... | |
get_tourid () | |
Get the Tour ID of the step. More... | |
handle_form_submission (local\forms\editstep &$mform, stdClass $data) | |
Handle submission of the step editing form. More... | |
is_first_step () | |
Whether this step is the first step in the tour. More... | |
is_last_step () | |
Whether this step is the last step in the tour. More... | |
persist ($force=false) | |
Save the tour and it's configuration to the database. More... | |
prepare_data_for_form () | |
Prepare the configuration data for the moodle form. More... | |
remove () | |
Remove this step. | |
set_config ($key, $value) | |
Set the configuration item as specified. More... | |
set_content ($value) | |
Set the content value for this step. More... | |
set_sortorder ($value) | |
Set the sortorder for this step. More... | |
set_targettype ($value) | |
Set the type of target for this step. More... | |
set_targetvalue ($value) | |
Set the target value for this step. More... | |
set_title ($value) | |
Set the title for this step. More... | |
set_tourid ($value) | |
Set the id of the tour. More... | |
to_record () | |
Prepare this step for saving to the database. More... | |
Static Public Member Functions | |
static | get_config_keys () |
The list of possible configuration keys. More... | |
static | get_string_from_input ($string) |
Attempt to fetch any matching langstring if the string is in the format identifier,component. More... | |
static | instance ($id) |
Fetch the step instance. More... | |
static | load_from_record ($record, $clean=false) |
Load the step instance. More... | |
Protected Member Functions | |
calculate_sortorder () | |
Calculate the next sort-order value. More... | |
fetch ($id) | |
Fetch the step instance. More... | |
reload () | |
Refresh the current step from the datbase. More... | |
reload_from_record ($record, $clean=false) | |
Reload the current step from the supplied record. More... | |
Protected Attributes | |
object | $config |
$config The configuration as an object. | |
string | $content |
$content The content of this step. | |
bool | $dirty = false |
$dirty Whether the step has been changed since it was loaded | |
int | $id |
$id The id of the step. | |
int | $sortorder |
$sortorder The sort order. | |
int | $targettype |
$targettype The type of target. | |
string | $targetvalue |
$targetvalue The value for this type of target. | |
string | $title |
$title The title of the step. | |
tour | $tour |
$tour The tour class that this step belongs to. | |
int | $tourid |
$tourid The id of the tour that this step belongs to. | |
Step class.
tool_usertours\step::add_config_field_to_form | ( | \MoodleQuickForm | $mform, |
$key | |||
) |
Add the specified step field configuration to the form.
MoodleQuickForm | $mform | The form to add configuration to. |
string | $key | The key to add. |
$this |
tool_usertours\step::add_config_to_form | ( | \MoodleQuickForm | $mform | ) |
Add the step configuration to the form.
MoodleQuickForm | $mform | The form to add configuration to. |
$this |
|
protected |
Calculate the next sort-order value.
int |
|
protected |
Fetch the step instance.
int | $id | The id of the step to be retrieved. |
step |
tool_usertours\step::get_config | ( | $key = null , |
|
$default = null |
|||
) |
Get the value of the specified configuration item.
If notvalue was found, and no default was specified, the default for the tour will be used.
string | $key | The configuration key to set. |
mixed | $default | The default value to use if a value was not found. |
mixed |
|
static |
The list of possible configuration keys.
array |
tool_usertours\step::get_content | ( | ) |
Get the body content of the step.
string |
tool_usertours\step::get_delete_link | ( | ) |
Get the delete link for this step.
moodle_url |
tool_usertours\step::get_edit_link | ( | ) |
Get the edit link for this step.
moodle_url |
tool_usertours\step::get_id | ( | ) |
Get the ID of the step.
int |
tool_usertours\step::get_movedown_link | ( | ) |
Get the link to move this step down in the sortorder.
moodle_url |
tool_usertours\step::get_moveup_link | ( | ) |
Get the link to move this step up in the sortorder.
moodle_url |
tool_usertours\step::get_placement_options | ( | ) |
Get the list of possible placement options.
array |
tool_usertours\step::get_sortorder | ( | ) |
Get the current sortorder for this step.
int |
|
static |
Attempt to fetch any matching langstring if the string is in the format identifier,component.
string | $string |
string |
tool_usertours\step::get_target | ( | ) |
Get the target instance for this step.
target |
tool_usertours\step::get_targettype | ( | ) |
Get the content value for this step.
string |
tool_usertours\step::get_targetvalue | ( | ) |
Get the target value for this step.
string |
tool_usertours\step::get_title | ( | ) |
Get the Title of the step.
string |
tool_usertours\step::get_tour | ( | ) |
Get the Tour instance that this step belongs to.
tour |
tool_usertours\step::get_tourid | ( | ) |
Get the Tour ID of the step.
int |
tool_usertours\step::handle_form_submission | ( | local\forms\editstep & | $mform, |
stdClass | $data | ||
) |
Handle submission of the step editing form.
local\forms\editstep | $mform | The sumitted form. |
stdClass | $data | The submitted data. |
$this |
|
static |
Fetch the step instance.
int | $id | The id of the step to be retrieved. |
step |
tool_usertours\step::is_first_step | ( | ) |
Whether this step is the first step in the tour.
boolean |
tool_usertours\step::is_last_step | ( | ) |
Whether this step is the last step in the tour.
boolean |
|
static |
Load the step instance.
stdClass | $record | The step record to be loaded. |
boolean | $clean | Clean the values. |
step |
tool_usertours\step::persist | ( | $force = false | ) |
Save the tour and it's configuration to the database.
boolean | $force | Whether to force writing to the database. |
$this |
tool_usertours\step::prepare_data_for_form | ( | ) |
Prepare the configuration data for the moodle form.
object |
|
protected |
Refresh the current step from the datbase.
step |
|
protected |
Reload the current step from the supplied record.
stdClass | $record | The step record to be loaded. |
boolean | $clean | Clean the values. |
step |
tool_usertours\step::set_config | ( | $key, | |
$value | |||
) |
Set the configuration item as specified.
string | $key | The configuration key to set. |
mixed | $value | The new value for the configuration item. |
$this |
tool_usertours\step::set_content | ( | $value | ) |
Set the content value for this step.
string | $value | The new content to use. |
$this |
tool_usertours\step::set_sortorder | ( | $value | ) |
Set the sortorder for this step.
int | $value | The new sortorder to use. |
$this |
tool_usertours\step::set_targettype | ( | $value | ) |
Set the type of target for this step.
string | $value | The new target to use. |
$this |
tool_usertours\step::set_targetvalue | ( | $value | ) |
Set the target value for this step.
string | $value | The new target value to use. |
$this |
tool_usertours\step::set_title | ( | $value | ) |
Set the title for this step.
string | $value | The new title to use. |
$this |
tool_usertours\step::set_tourid | ( | $value | ) |
Set the id of the tour.
int | $value | The id of the tour. |
self |
tool_usertours\step::to_record | ( | ) |
Prepare this step for saving to the database.
object |