/** * Annotate files from plugin configuration * @param backup_nested_element $assign the backup structure of the activity * @param string $subtype the plugin type to handle * @return void */ protected function annotate_plugin_config_files(backup_nested_element $assign, $subtype) { $dummyassign = new assign(null, null, null); $plugins = $dummyassign->load_plugins($subtype); foreach ($plugins as $plugin) { $component = $plugin->get_subtype() . '_' . $plugin->get_type(); $areas = $plugin->get_config_file_areas(); foreach ($areas as $area) { $assign->annotate_files($component, $area, null); } } }
/** * Restore files from plugin configuration * @param string $subtype the plugin type to handle * @return void */ protected function add_plugin_config_files($subtype) { $dummyassign = new assign(null, null, null); $plugins = $dummyassign->load_plugins($subtype); foreach ($plugins as $plugin) { $component = $plugin->get_subtype() . '_' . $plugin->get_type(); $areas = $plugin->get_config_file_areas(); foreach ($areas as $area) { $this->add_related_files($component, $area, null); } } }