Added a new function 'local_webhooks_get_total_count'

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-03-12 02:03:18 +04:00
parent 0e94634c49
commit 0a07c2ab22
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

10
lib.php
View File

@ -119,6 +119,16 @@ function local_webhooks_get_list_events() {
return report_eventlist_list_generator::get_all_events_list(true); 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. * Create an entry in the database.
* *