LockRules.class.php
This class contains only static methods dealing with lock rules
◆ 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_id | id of course, institute or user |
string | $attribute | the 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_id | id of course, institute or user |
- Returns
- boolean true if given entity is locked fpr the current user
◆ get()
get lockrule object for given id from static object pool
- Parameters
-
string | $lock_id | id 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
-
- 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
-
- Returns
- array of LockRule objects
◆ getLockRuleConfig()
static getLockRuleConfig |
( |
|
$type | ) |
|
|
static |
returns an array containing all lockable attributes for given entity type
- Parameters
-
string | $type | entity 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_id | id of course, institute or user |
bool | $renew | if 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: