Stud.IP  trunk Revision
AdmissionUserList Class Reference
Collaboration diagram for AdmissionUserList:
Collaboration graph

Public Member Functions

 __construct ($id='')
 
 addCondition ($condition)
 
 addUser ($userId)
 
 delete ()
 
 getConditions ()
 
 getFactor ()
 
 getId ()
 
 getName ()
 
 getOwnerId ()
 
 getUsers ()
 
 load ()
 
 removeCondition ($conditonId)
 
 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()

__construct (   $id = '')

Standard constructor.

Parameters
Stringid If this is an existing list, here is its ID.
Returns
This object.
Here is the call graph for this function:

Member Function Documentation

◆ __toString()

__toString ( )

Standard string representation of this object.

Returns
String
Here is the call graph for this function:

◆ addCondition()

addCondition (   $condition)

Adds the given condition to the list.

Parameters
UserFiltercondition
Returns
AdmissionUserList
Here is the caller graph for this function:

◆ addUser()

addUser (   $userId)

Adds the given user to the list.

Parameters
StringuserId
Returns
AdmissionUserList
Here is the caller graph for this function:

◆ delete()

delete ( )

Deletes this list.

Here is the call graph for this function:

◆ getConditions()

getConditions ( )

Gets the currently set conditions for automatic user selection.

Returns
Integer

◆ getFactor()

getFactor ( )

Gets the currently set manipulation factor for this list.

Returns
Float

◆ getId()

getId ( )

Gets the list ID.

Returns
String

◆ getName()

getName ( )

Gets the list name.

Returns
String

◆ getOwnerId()

getOwnerId ( )

Gets the owner ID.

Returns
String

◆ getUserLists()

static getUserLists (   $userId)
static

Gets all user lists the given user has created.

Parameters
StringuserId
Returns
array
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUsers()

getUsers ( )

Gets all assigned user IDs.

Returns
String

◆ load()

load ( )

Helper function for loading data from DB.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCondition()

removeCondition (   $conditonId)

Removes the given condition from the list.

Parameters
StringconditionId
Returns
AdmissionUserList

◆ removeUser()

removeUser (   $userId)

Removes the given user from the list.

Parameters
StringuserId
Returns
AdmissionUserList

◆ setConditions()

setConditions (   $conditions)

Set the conditions to the given set.

Parameters
Arrayconditions
Returns
AdmissionUserList
Here is the call graph for this function:

◆ setFactor()

setFactor (   $newFactor)

Sets a factor.

Parameters
float$newFactorThe new factor to be set.
Returns
AdmissionUserList

◆ setName()

setName (   $newName)

Sets a name.

Parameters
String$newNameNew list name.
Returns
AdmissionUserList

◆ setOwnerId()

setOwnerId (   $newOwnerId)

Sets a new owner.

Parameters
String$newOwnerIdNew owner Id.
Returns
AdmissionUserList

◆ setUsers()

setUsers (   $newUsers)

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

Parameters
Array$newUsersNew member list.
Returns
AdmissionUserList
Here is the call graph for this function:

◆ store()

store ( )

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

Here is the call graph for this function:

◆ toString()

toString ( )

String representation of this object.

Here is the caller graph for this function:

Field Documentation

◆ $conditions

$conditions = []

Conditions for automatic user selection.

◆ $factor

$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

$id = ''

Unique identifier of this list.

◆ $name

$name = ''

Some name to display for this list.

◆ $ownerId

$ownerId = ''

ID of the user who created this list.

◆ $users

$users = []

All user IDs that are on this list.


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