mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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
|
@ -96,5 +96,9 @@ class category_created extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_categories', 'restore' => 'glossary_category');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,5 +96,9 @@ class category_deleted extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_categories', 'restore' => 'glossary_category');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -96,5 +96,9 @@ class category_updated extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_categories', 'restore' => 'glossary_category');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,12 @@ defined('MOODLE_INTERNAL') || die();
|
|||
/**
|
||||
* The mod_glossary course module viewed event class.
|
||||
*
|
||||
* @property-read array $other {
|
||||
* Extra information about event.
|
||||
*
|
||||
* - string mode: (optional)
|
||||
* }
|
||||
*
|
||||
* @package mod_glossary
|
||||
* @since Moodle 2.7
|
||||
* @copyright 2014 Marina Glancy
|
||||
|
@ -68,4 +74,13 @@ class course_module_viewed extends \core\event\course_module_viewed {
|
|||
'view.php?id=' . $this->contextinstanceid . '&tab=-1',
|
||||
$this->objectid, $this->contextinstanceid);
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary', 'restore' => 'glossary');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,5 +98,9 @@ class entry_approved extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_entries', 'restore' => 'glossary_entry');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,5 +104,14 @@ class entry_created extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_entries', 'restore' => 'glossary_entry');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,5 +118,14 @@ class entry_deleted extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_entries', 'restore' => 'glossary_entry');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,5 +98,9 @@ class entry_disapproved extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_entries', 'restore' => 'glossary_entry');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,5 +104,14 @@ class entry_updated extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_entries', 'restore' => 'glossary_entry');
|
||||
}
|
||||
|
||||
public static function get_other_mapping() {
|
||||
// Nothing to map.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,5 +98,9 @@ class entry_viewed extends \core\event\base {
|
|||
throw new \coding_exception('Context level must be CONTEXT_MODULE.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function get_objectid_mapping() {
|
||||
return array('db' => 'glossary_entries', 'restore' => 'glossary_entry');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue