Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
user_filtering Class Reference

User filtering wrapper class. More...

Public Member Functions

 __construct ($fieldnames=null, $baseurl=null, $extraparams=null)
 Contructor.
 
 display_active ()
 Print the active filter form.
 
 display_add ()
 Print the add filter form.
 
 get_field ($fieldname, $advanced)
 Creates known user filter if present.
 
 get_sql_filter ($extra='', array $params=null)
 Returns sql where statement based on active user filters.
 

Public Attributes

user_active_filter_form $_activeform
 
user_add_filter_form $_addform
 
array $_fields
 

Detailed Description

User filtering wrapper class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

user_filtering::__construct ( $fieldnames = null,
$baseurl = null,
$extraparams = null )

Contructor.

Parameters
array$fieldnamesarray of visible user fields
string$baseurlbase url used for submission/return, null if the same of current page
array$extraparamsextra page parameters

Member Function Documentation

◆ get_field()

user_filtering::get_field ( $fieldname,
$advanced )

Creates known user filter if present.

Parameters
string$fieldname
boolean$advanced
Return values
objectfilter

◆ get_sql_filter()

user_filtering::get_sql_filter ( $extra = '',
array $params = null )

Returns sql where statement based on active user filters.

Parameters
string$extrasql
array$paramsnamed params (recommended prefix ex)
Return values
arraysql string and $params

The documentation for this class was generated from the following file: