aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--locallib.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/locallib.php b/locallib.php
index 6ad80b6..d02898b 100644
--- a/locallib.php
+++ b/locallib.php
@@ -72,6 +72,16 @@ function local_webhooks_cache_reset() {
}
/**
+ * Deleting all the events linked to the given service.
+ *
+ * @param number $serviceid
+ */
+function local_webhooks_delete_events($serviceid) {
+ global $DB;
+ $DB->delete_records(LOCAL_WEBHOOKS_TABLE_EVENTS, array("serviceid" => $serviceid));
+}
+
+/**
* Data serialization.
*
* @param array|object $data