Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Statusgruppen Class Reference
Inheritance diagram for Statusgruppen:
SimpleORMap PrivacyObject

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 ()
 
 sortSubGroupsAlphabetic ()
 
 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 createOrUpdate ($id, $name, $position, $range_id, $size, $selfassign, $selfassign_start, $selfassign_end, $makefolder, $dates=null)
 
static findBySeminar_id ($course_id)
 
static findByTermin_id ($termin_id)
 
static findContactGroups ($user_id=null)
 
static findJoinableGroups ($range_id, $user_id)
 
static reorderPositionsForRange ($range_id)
 
static getUserRoles ($context, $user)
 
static exportUserData (StoredUserData $storage)
 
- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static exists ($id)
 
static countBySql ($sql= '1', $params=[])
 
static create ($data)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=[])
 
static findOneBySQL ($where, $params=[])
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=[])
 
static findMany ($pks=[], $order= '', $order_params=[])
 
static findEachMany ($callable, $pks=[], $order= '', $order_params=[])
 
static findAndMapBySQL ($callable, $where, $params=[])
 
static findAndMapMany ($callable, $pks=[], $order= '', $order_params=[])
 
static deleteBySQL ($where, $params=[])
 
static toObject ($id_or_object)
 
static __callStatic ($name, $arguments)
 

Data Fields

 $keep_children = false
 
- Data Fields inherited from SimpleORMap
const ID_SEPARATOR = '_'
 

Static Protected Member Functions

static configure ($config=[])
 
- Static Protected Member Functions inherited from SimpleORMap
static db_table ()
 
static db_fields ()
 
static pk ()
 
static default_values ()
 
static serialized_fields ()
 
static alias_fields ()
 
static i18n_fields ()
 
static additional_fields ()
 
static has_many ()
 
static has_one ()
 
static belongs_to ()
 
static has_and_belongs_to_many ()
 
static registered_callbacks ()
 
static known_slots ()
 
static notification_map ()
 
static getter_setter_map ()
 
static configure ($config=[])
 
static config ($key)
 
static registerCallback ($types, $cb)
 
static unregisterCallback ($types, $cb)
 

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)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
- Protected Attributes inherited from SimpleORMap
 $content = []
 
 $content_db = []
 
 $is_new = true
 
 $is_deleted = false
 
 $relations = []
 
 $additional_data = []
 
- Static Protected Attributes inherited from SimpleORMap
static $config = []
 
static $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id']
 
static $performs_batch_operation = false
 

Member Function Documentation

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
cbAddPosition ( )

Adds the next free position if position is null.

cbReorderPositions ( )

Reorders position after delete or for the assoicated range_id.

static configure (   $config = [])
staticprotected
static createOrUpdate (   $id,
  $name,
  $position,
  $range_id,
  $size,
  $selfassign,
  $selfassign_start,
  $selfassign_end,
  $makefolder,
  $dates = null 
)
static

Creates or updates a statusgroup.

Parameters
string$idID of an existing group or empty if new group
string$namegroup name
int$positionposition or null if automatic position after other groups
string$range_idID of the object this group belongs to
int$sizemax number of members or 0 if unlimited
int$selfassignmay users join this group by themselves?
int$selfassign_startgroup joining is possible starting at ...
int$makefoldercreate a document folder assigned to this group?
array | null$datesdates assigned to this group. Defaults to null which means already assigned dates are not changed.
Returns
Statusgruppen The saved statusgroup.
Exceptions
Exception
delete ( )

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

Returns
int number of deleted groups
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.

static findAllByRangeId (   $range_id,
  $as_collection = false 
)
static
static findBySeminar_id (   $course_id)
static

Finds all statusgroups by a course id

Parameters
stringThe course id
Returns
array Statusgroups
static findByTermin_id (   $termin_id)
static
static findContactGroups (   $user_id = null)
static
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
findLecturers ( )

Finds Lecturers assigned to this group via course dates.

Returns
array
findTopics ( )

Finds CourseTopics assigned to this group via course dates.

Returns
array
getChildren ( )
getDatafields ( )
getFolder ( )

Gets the folder assigned to this statusgroup.

Returns
CourseGroupFolder|null
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
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
getGenderedName (   $user_or_id)

Returns the gendered name of a statusgroup

Parameters
string | User$user_idThe user_id
Returns
string The gendered name
getName ( )
getPlaces ( )

Displayfunction to show the places left in this group

Returns
string displaystring
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
hasFolder ( )

Checks if a statusgroup has a folder.

Returns
boolean true</> if the statusgroup has a folder, else false
hasSpace ( )

Checks if there is free space in this group

Returns
true if there is free space
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
moveUser (   $user_id,
  $pos 
)

Move a user to a position of a group

Parameters
string$user
type$pos
remove ( )

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

removeAllUsers ( )

Remove all users of this group

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
static reorderPositionsForRange (   $range_id)
static

Reorders the positions in numeric order without gaps (e.g. after a delete).

Parameters
string$range_idId of range
setDatafields (   $data)
sortMembersAlphabetic ( )

Sorts the member of a group alphabetic

sortSubGroupsAlphabetic ( )

Sorts subgroups alphabetical

updateFolder (   $set)

Delete or create a folder

Parameters
boolean$settrue Create a folder false Unlink the existing folder from the group
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
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
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

Field Documentation

$keep_children = false

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