Stud.IP  4.2 Revision
Statusgruppen Class Reference
Inheritance diagram for Statusgruppen:
Inheritance graph
Collaboration diagram for Statusgruppen:
Collaboration graph

Public Member Functions

 getChildren ()
 
 getDatafields ()
 
 setDatafields ($data)
 
 getFullGenderedPaths ($user_id, $seperator=" > ", $pre="")
 
 getFullGenderedName ($user_id, $seperator=' > ')
 
 getGenderedName ($user_or_id)
 
 getName ()
 
 hasFolder ()
 
 getFolder ()
 
 updateFolder ($set)
 
 findTopics ()
 
 findLecturers ()
 
 isMember ($user_id=null)
 
 getPlaces ()
 
 removeAllUsers ()
 
 removeUser ($user_id, $deep=false)
 
 addUser ($user_id, $check=false)
 
 userMayJoin ($user_id)
 
 userMayLeave ($user_id)
 
 userHasExclusiveGroup ($user_id)
 
 sortMembersAlphabetic ()
 
 hasSpace ()
 
 moveUser ($user_id, $pos)
 
 remove ()
 
 delete ()
 
 cbAddPosition ()
 
 cbReorderPositions ()
 
- Public Member Functions inherited from SimpleORMap
 __construct ($id=null)
 
 __clone ()
 
 getRelationOptions ($relation)
 
 getTableMetadata ()
 
 hasAutoIncrementColumn ()
 
 setId ($id)
 
 getId ()
 
 getNewId ()
 
 toArray ($only_these_fields=null)
 
 toRawArray ($only_these_fields=null)
 
 toArrayRecursive ($only_these_fields=null)
 
 getValue ($field)
 
 getRelationValue ($relation, $field)
 
 getDefaultValue ($field)
 
 setValue ($field, $value)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
 isField ($field)
 
 isAdditionalField ($field)
 
 isAliasField ($field)
 
 isI18nField ($field)
 
 setData ($data, $reset=false)
 
 isNew ()
 
 isDeleted ()
 
 setNew ($is_new)
 
 getWhereQuery ()
 
 restore ()
 
 store ()
 
 triggerChdate ()
 
 delete ()
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 initRelation ($relation)
 
 resetRelation ($relation)
 
 cleanup ()
 

Static Public Member Functions

static findAllByRangeId ($range_id, $as_collection=false)
 
static findBySeminar_id ($course_id)
 
static findByTermin_id ($termin_id)
 
static findContactGroups ($user_id=null)
 
static findJoinableGroups ($range_id, $user_id)
 
static getUserRoles ($context, $user)
 
static exportUserData (StoredUserData $storage)
 
- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static find ($id)
 
static exists ($id)
 
static countBySql ($sql=1, $params=array())
 
static create ($data)
 
static build ($data, $is_new=true)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=array())
 
static findOneBySQL ($where, $params=array())
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=array())
 
static findMany ($pks=array(), $order='', $order_params=array())
 
static findEachMany ($callable, $pks=array(), $order='', $order_params=array())
 
static findAndMapBySQL ($callable, $where, $params=array())
 
static findAndMapMany ($callable, $pks=array(), $order='', $order_params=array())
 
static deleteBySQL ($where, $params=array())
 
static toObject ($id_or_object)
 
static __callStatic ($name, $arguments)
 

Data Fields

 $keep_children = false
 

Static Protected Member Functions

static configure ($config=array())
 
- Static Protected Member Functions inherited from SimpleORMap
static configure ($config=array())
 
static config ($key)
 

Additional Inherited Members

- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Member Functions inherited from SimpleORMap
 _getId ($field)
 
 _setId ($field, $value)
 
 _getAdditionalValueFromRelation ($field)
 
 _setAdditionalValueFromRelation ($field, $value)
 
 _getAdditionalValue ($field)
 
 _setAdditionalValue ($field, $value)
 
 parseRelationOptions ($type, $name, $options)
 
 storeRelations ($only_these=null)
 
 deleteRelations ()
 
 initializeContent ()
 
 applyCallbacks ($type)
 
 registerCallback ($types, $cb)
 
 unregisterCallback ($types, $cb)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
 cbI18N ($type)
 
- Protected Attributes inherited from SimpleORMap
 $content = array()
 
 $content_db = array()
 
 $is_new = true
 
 $is_deleted = false
 
 $db_table = ''
 
 $db_fields = null
 
 $pk = null
 
 $default_values = array()
 
 $serialized_fields = array()
 
 $alias_fields = array()
 
 $i18n_fields = array()
 
 $additional_fields = array()
 
 $relations = array()
 
 $has_many = array()
 
 $has_one = array()
 
 $belongs_to = array()
 
 $has_and_belongs_to_many = array()
 
 $registered_callbacks = array()
 
 $known_slots = array()
 
 $notification_map = array()
 
 $additional_data = array()
 
 $getter_setter_map = array()
 
- Static Protected Attributes inherited from SimpleORMap
static $config = array()
 
static $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id')
 

Member Function Documentation

◆ addUser()

addUser (   $user_id,
  $check = false 
)

Adds a user to a group

Parameters
string$user_idThe user id
boolean$checkif true checks if there is space left in this group
Returns
boolean true if user was added
Here is the call graph for this function:

◆ cbAddPosition()

cbAddPosition ( )

Adds the next free position if position is null.

Here is the call graph for this function:

◆ cbReorderPositions()

cbReorderPositions ( )

Reorders position after delete or for the assoicated range_id.

◆ configure()

static configure (   $config = array())
staticprotected

◆ delete()

delete ( )

Deletes a status group and all it's child groups.

Returns
int number of deleted groups
Here is the call graph for this function:

◆ exportUserData()

static exportUserData ( StoredUserData  $storage)
static

Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.

Parameters
StoredUserData$storageobject to store data into

Implements PrivacyObject.

Here is the call graph for this function:

◆ findAllByRangeId()

static findAllByRangeId (   $range_id,
  $as_collection = false 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findBySeminar_id()

static findBySeminar_id (   $course_id)
static

Finds all statusgroups by a course id

Parameters
stringThe course id
Returns
array Statusgroups
Here is the caller graph for this function:

◆ findByTermin_id()

static findByTermin_id (   $termin_id)
static

◆ findContactGroups()

static findContactGroups (   $user_id = null)
static

◆ findJoinableGroups()

static findJoinableGroups (   $range_id,
  $user_id 
)
static

Find all groups belonging to the given range_id that may be joined by the given user.

Parameters
String$range_idrange_id the groups shall belong to
String$user_iduser to check
Returns
array
Here is the caller graph for this function:

◆ findLecturers()

findLecturers ( )

Finds Lecturers assigned to this group via course dates.

Returns
array

◆ findTopics()

findTopics ( )

Finds CourseTopics assigned to this group via course dates.

Returns
array

◆ getChildren()

getChildren ( )
Here is the call graph for this function:

◆ getDatafields()

getDatafields ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFolder()

getFolder ( )

Gets the folder assigned to this statusgroup.

Returns
CourseGroupFolder|null
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFullGenderedName()

getFullGenderedName (   $user_id,
  $seperator = ',
 
)

Produces string of all statusgroups a user is in (upwards from the current group)

Parameters
string$user_idThe user_id
string$seperatorThe sign between the full paths
Returns
array String of full gendered paths separated by given separator
Here is the call graph for this function:

◆ getFullGenderedPaths()

getFullGenderedPaths (   $user_id,
  $seperator = " > ",
  $pre = "" 
)

Produces an array of all statusgroups a user is in

Parameters
string$user_idThe user_id
string$seperatorThe sign between the full paths
string$prePreface of the outputted string (used for recursion)
Returns
array Stringarray of full gendered paths
Here is the call graph for this function:

◆ getGenderedName()

getGenderedName (   $user_or_id)

Returns the gendered name of a statusgroup

Parameters
string | User$user_idThe user_id
Returns
string The gendered name
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getName()

getName ( )

◆ getPlaces()

getPlaces ( )

Displayfunction to show the places left in this group

Returns
string displaystring
Here is the call graph for this function:

◆ getUserRoles()

static getUserRoles (   $context,
  $user 
)
static

Puts out an array of all gendered userroles for a user in a certain context

Parameters
string$contextThe context
string$userThe user id
Returns
array All roles
Here is the caller graph for this function:

◆ hasFolder()

hasFolder ( )

Checks if a statusgroup has a folder.

Returns
boolean true</> if the statusgroup has a folder, else false
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasSpace()

hasSpace ( )

Checks if there is free space in this group

Returns
true if there is free space
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMember()

isMember (   $user_id = null)

Checks if a user is a member of this group

Parameters
string$user_idThe user id
Returns
boolean true if user is a member of this group
Here is the caller graph for this function:

◆ moveUser()

moveUser (   $user_id,
  $pos 
)

Move a user to a position of a group

Parameters
string$user
type$pos
Here is the call graph for this function:

◆ remove()

remove ( )

Deletes a status group. Any associated child group will move upwards in the tree.

Here is the call graph for this function:

◆ removeAllUsers()

removeAllUsers ( )

Remove all users of this group

Here is the call graph for this function:

◆ removeUser()

removeUser (   $user_id,
  $deep = false 
)

Remove one user from this group

Parameters
string$user_idThe user id
bool$deepRemove user from children as well?
Returns
bool
Here is the call graph for this function:

◆ setDatafields()

setDatafields (   $data)
Here is the call graph for this function:

◆ sortMembersAlphabetic()

sortMembersAlphabetic ( )

Sorts the member of a group alphabetic

◆ updateFolder()

updateFolder (   $set)

Delete or create a folder

Parameters
boolean$settrue Create a folder false Unlink the existing folder from the group
Here is the call graph for this function:

◆ userHasExclusiveGroup()

userHasExclusiveGroup (   $user_id)

Checks if the user is already in an exclusive group of this range

Parameters
string$user_idThe user id
Returns
boolean true if user has already an exclusive group
Here is the call graph for this function:
Here is the caller graph for this function:

◆ userMayJoin()

userMayJoin (   $user_id)

Checks if a user could join this group

Parameters
string$user_idThe user id
Returns
boolean true if user is allowed to join
Here is the call graph for this function:
Here is the caller graph for this function:

◆ userMayLeave()

userMayLeave (   $user_id)

Checks if a user could leave this group

Parameters
string$user_idThe user id
Returns
boolean true if user is allowed to leave
Here is the call graph for this function:

Field Documentation

◆ $keep_children

$keep_children = false

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