Added get a total count records
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
		@@ -187,6 +187,18 @@ final class api {
 | 
			
		||||
        return $services;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 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.
 | 
			
		||||
     *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user