Stud.IP  5.4
UserFilter Class Reference

Public Member Functions

 __construct ($conditionId='')
 
 addField ($field)
 
 delete ()
 
 generateId ()
 
 getFields ()
 
 getId ()
 
 getUsers ()
 
 hasField ($className)
 
 isFulfilled ($userId)
 
 load ()
 
 removeField ($fieldId)
 
 store ()
 
 toString ()
 
 __toString ()
 
 __clone ()
 

Data Fields

 $fields = []
 
 $id = ''
 
 $show_user_count = false
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $conditionId = '')

Standard constructor.

Parameters
StringconditionId
Returns
UserFilter

Member Function Documentation

◆ __clone()

__clone ( )

◆ __toString()

__toString ( )

◆ addField()

addField (   $field)

Add a new condition field.

Parameters
ConditionFieldfieldId
Returns
UserFilter

◆ delete()

delete ( )

Deletes the condition and all associated fields.

◆ generateId()

generateId ( )

Generate a new unique ID.

Parameters
StringtableName

◆ getFields()

getFields ( )

Get all fields (without checking for validity according to the current time).

Returns
Array

◆ getId()

getId ( )

Get ID.

Returns
String

◆ getUsers()

getUsers ( )

Gets all users that fulfill the current condition.

Returns
Array

◆ hasField()

hasField (   $className)

Checks whether the current filter object contains a field of the given type.

Parameters
String$classNamethe type to check for
Returns
UserFilterField Return the found field or null if not applicable.

◆ isFulfilled()

isFulfilled (   $userId)

Is the current condition fulfilled (that means, are all required field values matched)?

Returns
boolean

◆ load()

load ( )

Helper function for loading data from DB.

◆ removeField()

removeField (   $fieldId)

Removes the field with the given ID from the condition fields.

Parameters
StringfieldId
Returns
UserFilter

◆ store()

store ( )

Stores data to DB.

◆ toString()

toString ( )

Field Documentation

◆ $fields

$fields = []

All condition fields that form this condition.

◆ $id

$id = ''

Unique identifier for this condition.

◆ $show_user_count

$show_user_count = false

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