◆ __construct()
__construct |
( |
|
$fieldId = '' | ) |
|
Standard constructor.
- Parameters
-
String | $fieldId | If a fieldId is given, the corresponding data is loaded from database. |
◆ __clone()
◆ checkValue()
Checks whether the given value fits the configured condition. The value is compared to the currently selected value by using the currently selected compare operator.
- Parameters
-
- Returns
- Boolean
◆ delete()
Deletes the stored data for this condition field from DB.
◆ generateId()
Generate a new unique ID.
- Parameters
-
◆ getAvailableFilterFields()
static getAvailableFilterFields |
( |
| ) |
|
|
static |
Reads all available UserFilterField subclasses and loads their definitions.
◆ getCompareOperator()
Which compare operator is set?
- Returns
- String
◆ getCompareOperatorAsText()
getCompareOperatorAsText |
( |
| ) |
|
Which compare operator is set?
- Returns
- String
◆ getId()
◆ getName()
Get this field's display name.
- Returns
- String
◆ getParameterizedTypes()
static getParameterizedTypes |
( |
| ) |
|
|
static |
◆ getUsers()
getUsers |
( |
|
$restrictions = [] | ) |
|
Compares all the users' values by using the specified compare operator and returns all users that fulfill the condition. This can be an important information when checking on validity of a combination of conditions.
- Parameters
-
Array | $restrictions | values from other fields that restrict the valid values for a user (e.g. a semester of study in a given subject) |
- Returns
- Array All users that are affected by the current condition field.
◆ getUserValues()
getUserValues |
( |
|
$userId, |
|
|
|
$additional = null |
|
) |
| |
Gets the value for the given user that is relevant for this condition field. Here, this method looks up the study degree(s) for the user. These can then be compared with the required degrees whether they fit.
- Parameters
-
String | $userId | User to check. |
array | $additional | conditions that are required for check. |
- Returns
- array The value(s) for this user.
◆ getValidCompareOperators()
getValidCompareOperators |
( |
| ) |
|
Returns all valid compare operators.
- Returns
- Array Array of valid compare operators.
◆ getValidValues()
Returns all valid values. Values can be loaded dynamically from database or be returned as static array.
- Returns
- Array Valid values in the form $value => $displayname.
◆ getValue()
Which value is set?
- Returns
- String
◆ load()
Helper function for loading data from DB.
◆ setCompareOperator()
setCompareOperator |
( |
|
$newOperator | ) |
|
◆ setConditionId()
◆ setValue()
◆ store()
Stores data to DB.
- Parameters
-
String | conditionId The condition this field belongs to. |
◆ $available_filter_fields
◆ $cached_valid_values
◆ $compareOperator
Which of the valid compare operators is currently chosen?
◆ $conditionId
◆ $id
Unique ID for this condition field.
◆ $isParameterized
◆ $relations
◆ $sortOrder
◆ $userDataDbField
◆ $userDataDbTable
◆ $validCompareOperators
$validCompareOperators = [] |
The set of valid compare operators.
◆ $validValues
All valid values for this field.
◆ $value
Which of the valid values is currently chosen?
◆ $valuesDbIdField
◆ $valuesDbNameField
◆ $valuesDbTable
Database tables and fields to get valid values and concrete user values from.
The documentation for this class was generated from the following file: