Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Abstract structure step, parent of all the activity structure steps. More...
Public Member Functions | |
destroy () | |
Destroy all circular references. | |
execute () | |
This function will perform all the actions necessary to achieve the execution of the plan/part/task. | |
get_name () | |
get_task () | |
As far as backup structure steps are implementing backup_plugin stuff, they need to have the parent task available for wrapping purposes (get course/context....) | |
log ($message, $level, $a=null, $depth=null, $display=false) | |
This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed. | |
set_task ($task) | |
Protected Member Functions | |
add_plugin_structure ($plugintype, $element, $multiple) | |
Add plugin structure to any element in the structure backup tree. | |
add_subplugin_structure ($subplugintype, $element, $multiple, $plugintype=null, $pluginname=null) | |
Add subplugin structure for a given plugin to any element in the structure backup tree. | |
define_structure () | |
Define the structure to be processed by this backup step. | |
execute_condition () | |
To conditionally decide if one step will be executed or no. | |
get_backupid () | |
get_basepath () | |
get_courseid () | |
get_logger () | |
get_setting ($name) | |
get_setting_value ($name) | |
get_settings () | |
Protected API starts here. | |
prepare_activity_structure ($activitystructure) | |
Wraps any activity backup structure within the common 'activity' element that will include common to all activities information like id, context... | |
setting_exists ($name) | |
Protected Attributes | |
backup_xml_transformer null | $contenttransformer |
xml content transformer being used (need it here, apart from xml_writer, thanks to serialized data to process - say thanks to blocks!) | |
string | $filename |
Name of the file to be generated. | |
string | $name |
One simple name for identification purposes. | |
base_task null | $task |
Task this is part of. | |
Abstract structure step, parent of all the activity structure steps.
Used to wrap the activity structure definition within the main <activity ...> tag.
|
protectedinherited |
Add plugin structure to any element in the structure backup tree.
string | $plugintype | type of plugin as defined by core_component\get_plugin_types() |
backup_nested_element | $element | element in the structure backup tree that we are going to add plugin information to |
bool | $multiple | to define if multiple plugins can produce information for each instance of $element (true) or no (false) |
|
protectedinherited |
Add subplugin structure for a given plugin to any element in the structure backup tree.
This method allows the injection of subplugins (of a specified plugin) data to any element in any backup structure.
NOTE: Initially subplugins were only available for activities (mod), so only the backup_activity_structure_step class had support for them, always looking for /mod/modulenanme subplugins. This new method is a generalization of the existing one for activities, supporting all subplugins injecting information everywhere.
string | $subplugintype | type of subplugin as defined in plugin's db/subplugins.json. |
backup_nested_element | $element | element in the backup tree (anywhere) that we are going to add subplugin information to. |
bool | $multiple | to define if multiple subplugins can produce information for each instance of $element (true) or no (false). |
string | $plugintype | type of the plugin. |
string | $pluginname | name of the plugin. |
void |
|
abstractprotectedinherited |
Define the structure to be processed by this backup step.
backup_nested_element |
Reimplemented in backup_assign_activity_structure_step, backup_bigbluebuttonbn_activity_structure_step, backup_book_activity_structure_step, backup_chat_activity_structure_step, backup_choice_activity_structure_step, backup_data_activity_structure_step, backup_feedback_activity_structure_step, backup_folder_activity_structure_step, backup_forum_activity_structure_step, backup_glossary_activity_structure_step, backup_h5pactivity_activity_structure_step, backup_imscp_activity_structure_step, backup_label_activity_structure_step, backup_lesson_activity_structure_step, backup_lti_activity_structure_step, backup_page_activity_structure_step, backup_resource_activity_structure_step, backup_scorm_activity_structure_step, backup_survey_activity_structure_step, backup_url_activity_structure_step, backup_wiki_activity_structure_step, and backup_workshop_activity_structure_step.
|
inherited |
Destroy all circular references.
It helps PHP 5.2 a lot!
|
inherited |
This function will perform all the actions necessary to achieve the execution of the plan/part/task.
Implements executable.
|
protectedinherited |
To conditionally decide if one step will be executed or no.
For steps needing to be executed conditionally, based in dynamic conditions (at execution time vs at declaration time) you must override this function. It will return true if the step must be executed and false if not
|
inherited |
This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed.
Implements loggable.
|
protected |
Wraps any activity backup structure within the common 'activity' element that will include common to all activities information like id, context...
backup_nested_element | $activitystructure | the element to wrap |
backup_nested_element | the $activitystructure wrapped by the common 'activity' element |