From 0a07c2ab22c8eac323562a8dbf32095f21fe0694 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 12 Mar 2018 02:03:18 +0400 Subject: Added a new function 'local_webhooks_get_total_count' Signed-off-by: Valentin Popov --- lib.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib.php') diff --git a/lib.php b/lib.php index 1e5868c..e773155 100644 --- a/lib.php +++ b/lib.php @@ -119,6 +119,16 @@ function local_webhooks_get_list_events() { return report_eventlist_list_generator::get_all_events_list(true); } +/** + * 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. * -- cgit v1.2.3