|
| | __construct (ModuleManagementModel $mvv_object) |
| |
| | __call ($name, $arguments) |
| |
| | setVariant ($variant) |
| |
| | havePerm ($perm, $status=null, $user_id=null, $institut_id=null) |
| |
| | haveObjectPerm ($perm, $user_id=null) |
| |
| | haveDfEntryPerm ($df_entry, $perm) |
| |
| | getFieldPerm ($field, $user_id=null, $institut_id=null) |
| |
| | haveFieldPerm ($field, $perm=null, $user_id=null, $institut_id=null) |
| |
| | disable ($field, $perm=null, $user_id=null, $institut_id=null) |
| |
◆ __construct()
◆ __call()
| __call |
( |
|
$name, |
|
|
|
$arguments |
|
) |
| |
◆ __callStatic()
| static __callStatic |
( |
|
$name, |
|
|
|
$arguments |
|
) |
| |
|
static |
◆ disable()
| disable |
( |
|
$field, |
|
|
|
$perm = null, |
|
|
|
$user_id = null, |
|
|
|
$institut_id = null |
|
) |
| |
◆ get()
| static get |
( |
|
$mvv_object | ) |
|
|
static |
◆ getFieldPerm()
| getFieldPerm |
( |
|
$field, |
|
|
|
$user_id = null, |
|
|
|
$institut_id = null |
|
) |
| |
|
final |
Retrieves the permission for the table or object. Returns the (max) perm the given or current user have globally. If the institute is set, checks for the perm in the context of this institute.
- Parameters
-
| string|array | Name of field or an array with name of field and related entry (usefull in the case of relations to datafields). |
| string | $user_id | The ID of the user. If not set the ID of the current user. |
| string | $institut_id | The ID of an institute if the user role is defined for institutes. |
- Returns
- int The perm defined in class MVVPlugin.
◆ getOwnInstitutes()
| static getOwnInstitutes |
( |
|
$user_id = null, |
|
|
|
$mvv_roles = null |
|
) |
| |
|
static |
Returns all ids of institutes the user is assigned with at least one role. Have the user at least one role globally an empty array is returned. If the user has no role at any institute false is returned.
- Parameters
-
| string | $user_id | Optional. The actual user if not set. |
| array | $mvv_roles | Optional. An array of roles. All MvvPlugin-Roles if not set. |
- Returns
- array An array of institute ids or an empty array.
◆ getPerm()
| static getPerm |
( |
|
$object, |
|
|
|
$status = null, |
|
|
|
$user_id = null, |
|
|
|
$institut_id = null, |
|
|
|
$variant = null |
|
) |
| |
|
staticfinal |
Retrieves the permission for the table or object. Returns the (max) perm the given or current user has globally. If the institute is set, checks for the perm in the context of this institute.
- Parameters
-
| object | string | $object | An mvv object or its class name. |
| string | $status | Constrain the permission to this status of the object. |
| string | $user_id | The ID of the user. If not set the ID of the current user. |
| string | array | $institut_id | The ID(s) of institute(s) if the user role is defined for institutes. |
| string | $variant | The optional variant of the object table (e.g. to support different languages) |
- Returns
- int The perm defined in class MVVPlugin.
- Exceptions
-
| InvalidArgumentException | If the object is not of type ApplicationSimpleOrMap. |
◆ getRoles()
| static getRoles |
( |
|
$user_id | ) |
|
|
static |
◆ haveDfEntryPerm()
| haveDfEntryPerm |
( |
|
$df_entry, |
|
|
|
$perm |
|
) |
| |
◆ haveFieldPerm()
| haveFieldPerm |
( |
|
$field, |
|
|
|
$perm = null, |
|
|
|
$user_id = null, |
|
|
|
$institut_id = null |
|
) |
| |
|
final |
◆ haveObjectPerm()
| haveObjectPerm |
( |
|
$perm, |
|
|
|
$user_id = null |
|
) |
| |
◆ havePerm()
| havePerm |
( |
|
$perm, |
|
|
|
$status = null, |
|
|
|
$user_id = null, |
|
|
|
$institut_id = null |
|
) |
| |
|
final |
◆ refreshPrivileges()
| static refreshPrivileges |
( |
|
$mvv_table | ) |
|
|
static |
◆ setVariant()
◆ PERM_ADMIN
Permission to read, write/create and delete the value of the designated field. Possibly the admin have permission to particular functions.
◆ PERM_CREATE
Permission to read, write/create and delete the value of the designated field.
◆ PERM_READ
Permission to read the value of the designated field.
◆ PERM_WRITE
Permission to read and write the value of the designated field.
The documentation for this class was generated from the following file: