Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
backup_imscp_activity_structure_step Class Reference

Define the complete imscp structure for backup, with file and id annotations. More...

Inheritance diagram for backup_imscp_activity_structure_step:
backup_activity_structure_step backup_structure_step backup_step base_step executable loggable

Public Member Functions

 destroy ()
 Destroy all circular references. More...
 
 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. More...
 
 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. More...
 
 define_structure ()
 Define the structure to be processed by this backup step. More...
 
 execute_condition ()
 To conditionally decide if one step will be executed or no. More...
 
 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... More...
 
 setting_exists ($name)
 

Protected Attributes

 $contenttransformer
 
 $filename
 
 $name
 
 $task
 

Detailed Description

Define the complete imscp structure for backup, with file and id annotations.

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

Member Function Documentation

◆ add_plugin_structure()

backup_structure_step::add_plugin_structure (   $plugintype,
  $element,
  $multiple 
)
protectedinherited

Add plugin structure to any element in the structure backup tree.

Parameters
string$plugintypetype of plugin as defined by core_component::get_plugin_types()
backup_nested_element$elementelement in the structure backup tree that we are going to add plugin information to
bool$multipleto define if multiple plugins can produce information for each instance of $element (true) or no (false)

◆ add_subplugin_structure()

backup_structure_step::add_subplugin_structure (   $subplugintype,
  $element,
  $multiple,
  $plugintype = null,
  $pluginname = null 
)
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.

Parameters
string$subplugintypetype of subplugin as defined in plugin's db/subplugins.json.
backup_nested_element$elementelement in the backup tree (anywhere) that we are going to add subplugin information to.
bool$multipleto define if multiple subplugins can produce information for each instance of $element (true) or no (false).
string$plugintypetype of the plugin.
string$pluginnamename of the plugin.
Return values
void

◆ define_structure()

backup_imscp_activity_structure_step::define_structure ( )
protected

Define the structure to be processed by this backup step.

Return values
backup_nested_element

Reimplemented from backup_structure_step.

◆ destroy()

base_step::destroy ( )
inherited

Destroy all circular references.

It helps PHP 5.2 a lot!

◆ execute_condition()

backup_structure_step::execute_condition ( )
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


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