mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-46455 mod_*: added restore mapping to events
This commit is contained in:
parent
ef15eae433
commit
0bfafc5ba0
170 changed files with 1364 additions and 19 deletions
|
@ -47,4 +47,8 @@ class course_module_viewed extends \core\event\course_module_viewed {
|
|||
$this->data['crud'] = 'r';
|
||||
$this->data['edulevel'] = self::LEVEL_PARTICIPATING;
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data', 'restore' => 'data');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,4 +110,15 @@ class field_created extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data_fields', 'restore' => 'data_field');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,4 +109,15 @@ class field_deleted extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data_fields', 'restore' => 'data_field');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,4 +109,15 @@ class field_updated extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data_fields', 'restore' => 'data_field');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,15 @@ class record_created extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data_records', 'restore' => 'data_record');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,15 @@ class record_deleted extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data_records', 'restore' => 'data_record');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,15 @@ class record_updated extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'data_records', 'restore' => 'data_record');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,11 @@ class template_updated extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,4 +103,11 @@ class template_viewed extends \core\event\base {
|
|||
throw new \coding_exception('The \'dataid\' value must be set in other.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
$othermapped = array();
|
||||
$othermapped['dataid'] = array('db' => 'data', 'restore' => 'data');
|
||||
|
||||
return $othermapped;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue