mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-27448 Added common base class for all resource module successors
This commit is contained in:
parent
d61ed0afdc
commit
9b5f831803
@ -1516,7 +1516,42 @@ abstract class moodle1_mod_handler extends moodle1_plugin_handler {
|
||||
|
||||
|
||||
/**
|
||||
* Base class for activity module handlers
|
||||
* Base class for all modules that are successors of the 1.9 resource module
|
||||
*/
|
||||
abstract class moodle1_resource_successor_handler extends moodle1_mod_handler {
|
||||
|
||||
/**
|
||||
* Resource successors do not attach to paths themselves, they are called explicitely
|
||||
* by moodle1_mod_resource_handler
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
final public function get_paths() {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts /MOODLE_BACKUP/COURSE/MODULES/MOD/RESOURCE data
|
||||
*
|
||||
* Called by {@link moodle1_mod_resource_handler::process_resource()}
|
||||
*
|
||||
* @param array $data pre-cooked legacy resource data
|
||||
* @param array $raw raw legacy resource data
|
||||
*/
|
||||
public function process_resource(array $data, array $raw) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the parses reaches the end </MOD> resource tag
|
||||
*
|
||||
* @param array $data the data returned by {@link self::process_resource} or just pre-cooked
|
||||
*/
|
||||
public function on_resource_end(array $data) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for block handlers
|
||||
*/
|
||||
abstract class moodle1_block_handler extends moodle1_plugin_handler {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user