aboutsummaryrefslogtreecommitdiff
path: root/classes/local
diff options
context:
space:
mode:
Diffstat (limited to 'classes/local')
-rw-r--r--classes/local/api.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/local/api.php b/classes/local/api.php
index c937aa5..ea70a91 100644
--- a/classes/local/api.php
+++ b/classes/local/api.php
@@ -188,6 +188,18 @@ final class api {
}
/**
+ * Get a total count of existing records.
+ *
+ * @return int
+ * @throws \dml_exception
+ */
+ public static function get_total_count(): int {
+ global $DB;
+
+ return $DB->count_records(LW_TABLE_SERVICES);
+ }
+
+ /**
* Update an existing record in the database.
*
* @param \local_webhooks\local\record $service