Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Public Member Functions | |
add_config_field_to_form (\MoodleQuickForm $mform, $key) | |
Add the specified step field configuration to the form. | |
add_config_to_form (\MoodleQuickForm $mform) | |
Add the step configuration to the form. | |
get_config ($key=null, $default=null) | |
Get the value of the specified configuration item. | |
get_content () | |
Get the body content of the step. | |
get_contentformat () | |
Get the content format of the step. | |
get_delete_link () | |
Get the delete link for this step. | |
get_edit_link () | |
Get the edit link for this step. | |
get_id () | |
Get the ID of the step. | |
get_movedown_link () | |
Get the link to move this step down in the sortorder. | |
get_moveup_link () | |
Get the link to move this step up in the sortorder. | |
get_placement_options () | |
Get the list of possible placement options. | |
get_sortorder () | |
Get the current sortorder for this step. | |
get_target () | |
Get the target instance for this step. | |
get_targettype () | |
Get the content value for this step. | |
get_targetvalue () | |
Get the target value for this step. | |
get_title () | |
Get the Title of the step. | |
get_tour () | |
Get the Tour instance that this step belongs to. | |
get_tourid () | |
Get the Tour ID of the step. | |
handle_form_submission (local\forms\editstep &$mform, stdClass $data) | |
Handle submission of the step editing form. | |
is_first_step () | |
Whether this step is the first step in the tour. | |
is_last_step () | |
Whether this step is the last step in the tour. | |
persist ($force=false) | |
Save the tour and it's configuration to the database. | |
prepare_data_for_form () | |
Prepare the configuration data for the moodle form. | |
remove () | |
Remove this step. | |
set_config ($key, $value) | |
Set the configuration item as specified. | |
set_content ($value, $format=FORMAT_HTML) | |
Set the content value for this step. | |
set_sortorder ($value) | |
Set the sortorder for this step. | |
set_targettype ($value) | |
Set the type of target for this step. | |
set_targetvalue ($value) | |
Set the target value for this step. | |
set_title ($value) | |
Set the title for this step. | |
set_tourid ($value) | |
Set the id of the tour. | |
to_record (bool $isexporting=false) | |
Prepare this step for saving to the database. | |
Static Public Member Functions | |
static | get_config_keys () |
The list of possible configuration keys. | |
static | get_step_image_from_input (string $content) |
Attempt to replace PIXICON placeholder with the correct images for tour step content. | |
static | get_string_from_input ($string) |
Attempt to fetch any matching langstring if the string is in the format identifier,component. | |
static | instance ($id) |
Fetch the step instance. | |
static | load_from_record ($record, $clean=false, bool $isimporting=false) |
Load the step instance. | |
Protected Member Functions | |
calculate_sortorder () | |
Calculate the next sort-order value. | |
embed_files () | |
Embed attached file to the json file for step. | |
extract_files () | |
Get the embed files information and create store_file for this step. | |
fetch ($id) | |
Fetch the step instance. | |
reload () | |
Refresh the current step from the datbase. | |
reload_from_record ($record, $clean=false) | |
Reload the current step from the supplied record. | |
set_importing (bool $isimporting=false) | |
Set the import state for the step. | |
Protected Attributes | |
object | $config |
$config The configuration as an object. | |
string | $content |
$content The content of this step. | |
int | $contentformat |
$contentformat The content format: FORMAT_MOODLE/FORMAT_HTML/FORMAT_PLAIN/FORMAT_MARKDOWN. | |
bool | $dirty = false |
$dirty Whether the step has been changed since it was loaded | |
stdClass[] | $files = [] |
$files The list of attached files for this step. | |
int | $id |
$id The id of the step. | |
bool | $isimporting |
$isimporting Whether the step is being imported or not. | |
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. | |
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 |
Embed attached file to the json file for step.
array | List of files. |
|
protected |
Get the embed files information and create store_file for this step.
void |
|
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_contentformat | ( | ) |
Get the content format of the step.
int |
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 replace PIXICON placeholder with the correct images for tour step content.
string | $content | Tour content |
string | Processed tour content |
|
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. |
bool | $clean | Clean the values. |
bool | $isimporting | Whether the step is being imported or not. |
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. |
bool | $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, | |
$format = FORMAT_HTML ) |
Set the content value for this step.
string | $value | The new content to use. |
int | $format | The new format to use: FORMAT_MOODLE/FORMAT_HTML/FORMAT_PLAIN/FORMAT_MARKDOWN. |
$this |
|
protected |
Set the import state for the step.
bool | $isimporting | True if the step is imported, otherwise false. |
void |
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 | ( | bool | $isexporting = false | ) |
Prepare this step for saving to the database.
bool | $isexporting | Whether the step is being exported or not. |
object |