Stud.IP  5.4
AdmissionUserList Class Reference

Public Member Functions

 __construct ($id='')
 
 addCondition ($condition)
 
 addUser ($userId)
 
 delete ()
 
 getConditions ()
 
 getFactor ()
 
 getId ()
 
 getName ()
 
 getOwnerId ()
 
 getUsers (bool $as_objects=false)
 
 load ()
 
 removeCondition ($conditionId)
 
 removeUser ($userId)
 
 setConditions ($conditions)
 
 setFactor ($newFactor)
 
 setName ($newName)
 
 setOwnerId ($newOwnerId)
 
 setUsers ($newUsers)
 
 describe (array $wrapper=['', ''])
 
 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.

Member Function Documentation

◆ __toString()

__toString ( )

Standard string representation of this object.

Returns
String

◆ addCondition()

addCondition (   $condition)

Adds the given condition to the list.

Parameters
UserFiltercondition
Returns
AdmissionUserList

◆ addUser()

addUser (   $userId)

Adds the given user to the list.

Parameters
StringuserId
Returns
AdmissionUserList

◆ delete()

delete ( )

Deletes this list.

◆ describe()

describe ( array  $wrapper = ['',
'']   
)

◆ 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

◆ getUsers()

getUsers ( bool  $as_objects = false)

Gets all assigned user IDs.

Parameters
bool$as_objectsWhether the users should be returned as objects
Returns
array|User[]

◆ load()

load ( )

Helper function for loading data from DB.

◆ removeCondition()

removeCondition (   $conditionId)

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

◆ 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

◆ store()

store ( )

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

◆ toString()

toString ( )

String representation of this object.

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: