MDL-68193 core: added new database_text_field_content_replaced event
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user