aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-03-12 01:03:18 +0300
committerValentin Popov <info@valentineus.link>2018-03-12 01:05:27 +0300
commit0a07c2ab22c8eac323562a8dbf32095f21fe0694 (patch)
treeb132f1336c282039547b03625a788188bd9325ad
parent0e94634c49e88df6b46d3a5fe7929d871ea51e75 (diff)
downloadlocal_webhooks-0a07c2ab22c8eac323562a8dbf32095f21fe0694.tar.xz
local_webhooks-0a07c2ab22c8eac323562a8dbf32095f21fe0694.zip
Added a new function 'local_webhooks_get_total_count'
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--lib.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib.php b/lib.php
index 1e5868c..e773155 100644
--- a/lib.php
+++ b/lib.php
@@ -120,6 +120,16 @@ function local_webhooks_get_list_events() {
}
/**
+ * Get the total number of records.
+ *
+ * @return number
+ */
+function local_webhooks_get_total_count() {
+ global $DB;
+ return $DB->count_records("local_webhooks_service", array());
+}
+
+/**
* Create an entry in the database.
*
* @param object $record