Stud.IP  5.4
LockRules Class Reference

Static Public Member Functions

static get ($lock_id)
 
static getAdministrableSeminarRules ($user_id)
 
static getAvailableSeminarRules ($user_id)
 
static getObjectRule ($object_id, $renew=false, $object_type=null)
 
static Check ($object_id, $attribute, $object_type=null)
 
static CheckLockRulePermission ($object_id)
 
static getLockRuleConfig ($type)
 

Detailed Description

LockRules.class.php

This class contains only static methods dealing with lock rules

Member Function Documentation

◆ Check()

static Check (   $object_id,
  $attribute,
  $object_type = null 
)
static

checks if an attribute of an entity is locked for the current user see self::getLockRuleConfig() for the list of attributes

Parameters
string$object_idid of course, institute or user
string$attributethe name of an lockable attribute
string | null$object_type: The type of object you want to check: "user", "sem" or "inst"
Returns
boolean true if attribute is locked for the current user

◆ CheckLockRulePermission()

static CheckLockRulePermission (   $object_id)
static

checks if given entity is locked for the current user

Parameters
string$object_idid of course, institute or user
Returns
boolean true if given entity is locked fpr the current user

◆ get()

static get (   $lock_id)
static

get lockrule object for given id from static object pool

Parameters
string$lock_idid of lockrule
Returns
LockRule

◆ getAdministrableSeminarRules()

static getAdministrableSeminarRules (   $user_id)
static

returns a list of lockrules that can be administrated with the given user id

Parameters
string$user_idid of user
Returns
array of LockRule objects

◆ getAvailableSeminarRules()

static getAvailableSeminarRules (   $user_id)
static

returns a list of lockrules that can be applied to a course with the given user id

Parameters
string$user_idid of user
Returns
array of LockRule objects

◆ getLockRuleConfig()

static getLockRuleConfig (   $type)
static

returns an array containing all lockable attributes for given entity type

Parameters
string$typeentity type, one of [sem,inst,user]
Returns
array

◆ getObjectRule()

static getObjectRule (   $object_id,
  $renew = false,
  $object_type = null 
)
static

returns the lock rule object for the given id, else null

Parameters
string$object_idid of course, institute or user
bool$renewif true, reloads the rule from database
string | null$object_type: The type of object you want to check: "user", "sem" or "inst"
Returns
LockRule

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