◆ abschlussFilter()
static abschlussFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all user with matching abschluss_id in $needles
- Parameters
-
array | $needles | List of abschluss ids to filter against |
- Returns
- array List of user ids matching the given filter
◆ abschlussValues()
static abschlussValues |
( |
| ) |
|
|
staticprotected |
Return all studydegrees
- Returns
- array Associative array of abschluss ids and abschluss names
◆ addType()
static addType |
( |
|
$name, |
|
|
|
$values_callback, |
|
|
|
$filter_callback |
|
) |
| |
|
static |
Adds or updates a filter criterion the global set of criteria.
- Parameters
-
string | $name | Name of the criterion type |
callback | $values_callback | Callback for the type's values |
callback | $filter_callback | Actual filter callback for a defined set of needles |
◆ clearFilters()
Clears all defined filters.
- Returns
- UserLookup Returns itself to allow chaining
◆ domainFilter()
static domainFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all users with a matching domain given in $needles
- Parameters
-
array | $needles | List of domain ids to filter against |
- Returns
- array List of user ids matching the given filter
◆ domainValues()
Return all valid domains
- Returns
- array Associative array of domain id and name
◆ execute()
Executes the actual lookup by executing all individual filter types and returning the intersection of all according result sets.
Possible flags:
- FLAG_SORT_NAME Sorts the user ids in the result by the actual user names
- FLAG_RETURN_FULL_INFO Returns rudimental user info instead of just the ids (as an array with the user id as key and an array containting the info as value)
- Parameters
-
int | $flags | Optional set of flags as seen above |
- Returns
- array Either a simple list of user ids or an associative array of user ids and user info if FLAG_RETURN_FULL_INFO is set
◆ fachFilter()
static fachFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all user with matching studiengang_id in $needles
- Parameters
-
array | $needles | List of studiengang ids to filter against |
- Returns
- array List of user ids matching the given filter
◆ fachsemesterFilter()
static fachsemesterFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all users with a matching fachsemester given in $needles
- Parameters
-
array | $needles | List of fachsemesters to filter against |
- Returns
- array List of user ids matching the given filter
◆ fachsemesterValues()
static fachsemesterValues |
( |
| ) |
|
|
staticprotected |
Create a array with all possible values for studysemesters
- Returns
- array Associative array of fachsemesters and fachsemesters (pretty dull, i know)
◆ fachValues()
Return all studycourses
- Returns
- array Associative array of studiengang ids and studiengang names
◆ getFilters()
◆ getValuesForType()
static getValuesForType |
( |
|
$type | ) |
|
|
static |
Returns all valid values for a certain criterion type.
- Parameters
-
string | $type | Name of the criterion type |
- Returns
- array Associative array containing the values as keys and descriptive names as values
◆ institutFilter()
static institutFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all users with a matching institut_id given in $needles
- Parameters
-
array | $needles | List of institut ids to filter against |
- Returns
- array List of user ids matching the given filter
◆ institutValues()
static institutValues |
( |
| ) |
|
|
staticprotected |
Return all faculty's and instituts
- Returns
- array Associative array of institut ids and institut data (Be aware that this array is multidimensional)
◆ roleFilter()
static roleFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all users with a matching assigned role given in $needles
- Parameters
-
array | $needles | List of domain ids to filter against |
- Returns
- array List of user ids matching the given filter
◆ roleValues()
Return all valid roles
- Returns
- array Associative array of domain id and name
◆ setFilter()
setFilter |
( |
|
$type, |
|
|
|
$value |
|
) |
| |
Adds another type filter to the set of current filters.
Multiple filters for the same filter type result in an AND filter within this type while multiple filters across filter types result in an OR filter across these types.
- Parameters
-
string | $type | Type of filter to add |
string | $value | Value to filter against |
- Returns
- UserLookup Returns itself to allow chaining
◆ statusFilter()
static statusFilter |
( |
|
$needles | ) |
|
|
staticprotected |
Return all users with a matching status given in $needles
- Parameters
-
array | $needles | List of statusses to filter against |
- Returns
- array List of user ids matching the given filter
◆ statusValues()
Return all valid statusses
- Returns
- array Associative array of status name and description
◆ $types
Initial value:= [
'abschluss' => [
'filter' => self::USE_COMBINED_STUDYGROUP_FILTER
◆ CACHE_DURATION
const CACHE_DURATION = 3600 |
◆ FLAG_RETURN_FULL_INFO
const FLAG_RETURN_FULL_INFO = 2 |
◆ FLAG_SORT_NAME
◆ USE_CACHE
◆ USE_COMBINED_STUDYGROUP_FILTER
const USE_COMBINED_STUDYGROUP_FILTER = 'use-combined-studygroup-filter' |
The documentation for this class was generated from the following file: