MDL-68193 core: added new database_text_field_content_replaced event

This commit is contained in:
Mark Nelson
2020-04-01 20:44:10 +02:00
parent f2fc4a9fa1
commit 52f993651c
4 changed files with 120 additions and 0 deletions
+11
View File
@@ -8873,6 +8873,17 @@ function db_replace($search, $replace) {
echo $OUTPUT->notification("...finished", 'notifysuccess');
}
// Trigger an event.
$eventargs = [
'context' => context_system::instance(),
'other' => [
'search' => $search,
'replace' => $replace
]
];
$event = \core\event\database_text_field_content_replaced::create($eventargs);
$event->trigger();
purge_all_caches();
return true;