Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
AdmissionUserList Class Reference

Public Member Functions

 __construct ($id='')
 
 addCondition ($condition)
 
 addUser ($userId)
 
 delete ()
 
 getConditions ()
 
 getFactor ()
 
 getId ()
 
 getName ()
 
 getOwnerId ()
 
 getUsers ()
 
 load ()
 
 removeCondition ($conditionId)
 
 removeUser ($userId)
 
 setConditions ($conditions)
 
 setFactor ($newFactor)
 
 setName ($newName)
 
 setOwnerId ($newOwnerId)
 
 setUsers ($newUsers)
 
 store ()
 
 toString ()
 
 __toString ()
 

Static Public Member Functions

static getUserLists ($userId)
 

Data Fields

 $id = ''
 
 $conditions = []
 
 $factor = 1
 
 $name = ''
 
 $ownerId = ''
 
 $users = []
 

Constructor & Destructor Documentation

__construct (   $id = '')

Standard constructor.

Parameters
Stringid If this is an existing list, here is its ID.
Returns
This object.

Member Function Documentation

__toString ( )

Standard string representation of this object.

Returns
String
addCondition (   $condition)

Adds the given condition to the list.

Parameters
UserFiltercondition
Returns
AdmissionUserList
addUser (   $userId)

Adds the given user to the list.

Parameters
StringuserId
Returns
AdmissionUserList
delete ( )

Deletes this list.

getConditions ( )

Gets the currently set conditions for automatic user selection.

Returns
Integer
getFactor ( )

Gets the currently set manipulation factor for this list.

Returns
Float
getId ( )

Gets the list ID.

Returns
String
getName ( )

Gets the list name.

Returns
String
getOwnerId ( )

Gets the owner ID.

Returns
String
static getUserLists (   $userId)
static

Gets all user lists the given user has created.

Parameters
StringuserId
Returns
array
getUsers ( )

Gets all assigned user IDs.

Returns
String
load ( )

Helper function for loading data from DB.

removeCondition (   $conditionId)

Removes the given condition from the list.

Parameters
StringconditionId
Returns
AdmissionUserList
removeUser (   $userId)

Removes the given user from the list.

Parameters
StringuserId
Returns
AdmissionUserList
setConditions (   $conditions)

Set the conditions to the given set.

Parameters
Arrayconditions
Returns
AdmissionUserList
setFactor (   $newFactor)

Sets a factor.

Parameters
float$newFactorThe new factor to be set.
Returns
AdmissionUserList
setName (   $newName)

Sets a name.

Parameters
String$newNameNew list name.
Returns
AdmissionUserList
setOwnerId (   $newOwnerId)

Sets a new owner.

Parameters
String$newOwnerIdNew owner Id.
Returns
AdmissionUserList
setUsers (   $newUsers)

Sets a set of new list members, replacing previous entries.

Parameters
Array$newUsersNew member list.
Returns
AdmissionUserList
store ( )

Function for storing the data to DB. Is not called automatically on changing object values.

toString ( )

String representation of this object.

Field Documentation

$conditions = []

Conditions for automatic user selection.

$factor = 1

A factor for seat distribution algorithm ("1" means normal algorithm, everything between 0 and 1 decreases the chance to get a seat, everything above 1 increases it.)

$id = ''

Unique identifier of this list.

$name = ''

Some name to display for this list.

$ownerId = ''

ID of the user who created this list.

$users = []

All user IDs that are on this list.


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