ILIAS
Release_4_4_x_branch Revision 61816
|
Class ilObjOrgUnitTree Implements a singleton pattern for caching. More...
Public Member Functions | |
getEmployees ($ref_id, $recursive=false) | |
getSuperiors ($ref_id, $recursive=false) | |
getAllChildren ($ref_id) | |
getOrgusWhereUserHasPermissionForOperation ($operation) | |
If you want to have all orgunits where the current user has the write permission: use this with the parameter "write". | |
getOrgusWhereUserHasPermissionForOperationId ($operation_id) | |
If you want to have all orgunits where the current user has the write permission: use this with the parameter 3 (3 is the "write" permission as in rbac_operations). | |
getAllOrgunitsOnLevelX ($level) | |
getEmployeesUnderUser ($user_id, $recursive=true) | |
getSuperiorsOfUser ($user_id, $recursive=true) | |
getLevelXOfUser ($user_id, $level) | |
for additional info see the other getLevelX method. | |
getOrgUnitOfUser ($user_id, $ref_id=0) | |
getOrgUnitOfUser | |
getTitles ($org_refs) | |
getEmployeeRoles () | |
getSuperiorRoles () | |
flushCache () | |
getLevelXOfTreenode ($orgu_ref, $level) | |
Specify eg. | |
getParent ($orgu_ref) |
Static Public Member Functions | |
static | _getInstance () |
singleton access. |
Private Member Functions | |
__construct () | |
making the construct private | |
loadStaff ($title, $ref_id) | |
loadStaffRecursive ($title, $ref_id) | |
loadArrayOfStaff ($title, $ref_ids) | |
getChildren ($ref_id) | |
loadChildren ($ref_id) | |
loadRoles ($role) | |
loadRolesQuery ($role) | |
getRefIdFromRoleTitle ($role_title) |
Private Attributes | |
$roles | |
$role_to_orgu | |
$staff | |
$tree_childs | |
$ctrl | |
$parent | |
$db |
Static Private Attributes | |
static | $instance |
Class ilObjOrgUnitTree Implements a singleton pattern for caching.
Definition at line 12 of file class.ilObjOrgUnitTree.php.
|
private |
making the construct private
Definition at line 38 of file class.ilObjOrgUnitTree.php.
References $ilCtrl.
|
static |
singleton access.
Definition at line 48 of file class.ilObjOrgUnitTree.php.
References $instance.
Referenced by ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ilOrgUnitStaffTableGUI\fillRow(), ilOrgUnitStaffTableGUI\parseData(), and ilOrgUnitStaffTableGUI\setRowForUser().
ilObjOrgUnitTree::flushCache | ( | ) |
Definition at line 365 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getAllChildren | ( | $ref_id | ) |
Definition at line 116 of file class.ilObjOrgUnitTree.php.
References $ref_id, and getChildren().
Referenced by getOrgUnitOfUser(), and loadStaffRecursive().
ilObjOrgUnitTree::getAllOrgunitsOnLevelX | ( | $level | ) |
Definition at line 213 of file class.ilObjOrgUnitTree.php.
References getChildren(), and ilObjOrgUnit\getRootOrgRefId().
|
private |
$ref_id |
Definition at line 197 of file class.ilObjOrgUnitTree.php.
References $ref_id, and loadChildren().
Referenced by getAllChildren(), and getAllOrgunitsOnLevelX().
ilObjOrgUnitTree::getEmployeeRoles | ( | ) |
Definition at line 349 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getEmployees | ( | $ref_id, | |
$recursive = false |
|||
) |
$ref_id | int the reference id of the organisational unit. |
$recursive | bool if true you get the ids of the subsequent orgunits employees too |
Definition at line 59 of file class.ilObjOrgUnitTree.php.
References $ref_id, loadStaff(), and loadStaffRecursive().
Referenced by getEmployeesUnderUser().
ilObjOrgUnitTree::getEmployeesUnderUser | ( | $user_id, | |
$recursive = true |
|||
) |
$user_id | int |
$recursive | bool if this is true subsequent orgunits of this users superior role get searched as well. |
Definition at line 232 of file class.ilObjOrgUnitTree.php.
References $res, and getEmployees().
ilObjOrgUnitTree::getLevelXOfTreenode | ( | $orgu_ref, | |
$level | |||
) |
Specify eg.
level 1 and it will return on which orgunit on the first level after the root node the specified orgu_ref is a subunit of. eg: 0
(6, 1) = 1; (4, 1) = 2; (6, 2) = 3;
$orgu_ref | |
$level |
Exception | in case there's a thread of an infinite loop or if you try to fetch the third level but there are only two (e.g. you want to fetch lvl 1 but give the root node as reference). |
Definition at line 402 of file class.ilObjOrgUnitTree.php.
References getParent(), and ilObjOrgUnit\getRootOrgRefId().
Referenced by getLevelXOfUser().
ilObjOrgUnitTree::getLevelXOfUser | ( | $user_id, | |
$level | |||
) |
for additional info see the other getLevelX method.
$user_id | |
$level |
Definition at line 284 of file class.ilObjOrgUnitTree.php.
References $res, and getLevelXOfTreenode().
ilObjOrgUnitTree::getOrgUnitOfUser | ( | $user_id, | |
$ref_id = 0 |
|||
) |
getOrgUnitOfUser
$user_id | ||
int | $ref_id | if given, only OrgUnits under this ID are returned (including $ref_id) |
Definition at line 315 of file class.ilObjOrgUnitTree.php.
References $ref_id, $res, and getAllChildren().
ilObjOrgUnitTree::getOrgusWhereUserHasPermissionForOperation | ( | $operation | ) |
If you want to have all orgunits where the current user has the write permission: use this with the parameter "write".
$operation | string |
Definition at line 134 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getOrgusWhereUserHasPermissionForOperationId | ( | $operation_id | ) |
If you want to have all orgunits where the current user has the write permission: use this with the parameter 3 (3 is the "write" permission as in rbac_operations).
$operation_id |
Definition at line 170 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getParent | ( | $orgu_ref | ) |
Definition at line 421 of file class.ilObjOrgUnitTree.php.
Referenced by getLevelXOfTreenode().
|
private |
Definition at line 380 of file class.ilObjOrgUnitTree.php.
Referenced by loadRolesQuery().
ilObjOrgUnitTree::getSuperiorRoles | ( | ) |
Definition at line 354 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getSuperiors | ( | $ref_id, | |
$recursive = false |
|||
) |
Definition at line 63 of file class.ilObjOrgUnitTree.php.
References $ref_id, loadStaff(), and loadStaffRecursive().
Referenced by getSuperiorsOfUser().
ilObjOrgUnitTree::getSuperiorsOfUser | ( | $user_id, | |
$recursive = true |
|||
) |
$user_id | int |
$recursive | bool if this is true subsequent orgunits of this users superior role get searched as well. |
Definition at line 256 of file class.ilObjOrgUnitTree.php.
References $res, and getSuperiors().
ilObjOrgUnitTree::getTitles | ( | $org_refs | ) |
Definition at line 338 of file class.ilObjOrgUnitTree.php.
References ilObject\_lookupObjId(), and ilObject\_lookupTitle().
|
private |
$title | "employee" or "superior" |
$ref_ids | int[] array of orgu object ref ids. |
Definition at line 85 of file class.ilObjOrgUnitTree.php.
References $ref_id, $res, and loadRoles().
Referenced by loadStaff(), and loadStaffRecursive().
|
private |
Definition at line 202 of file class.ilObjOrgUnitTree.php.
References $ref_id.
Referenced by getChildren().
|
private |
Definition at line 359 of file class.ilObjOrgUnitTree.php.
References loadRolesQuery().
Referenced by getEmployeeRoles(), getSuperiorRoles(), and loadArrayOfStaff().
|
private |
Definition at line 369 of file class.ilObjOrgUnitTree.php.
References $res, and getRefIdFromRoleTitle().
Referenced by loadRoles().
|
private |
$title | string "employee" or "superior" |
$ref_id | int ref id of org unit. |
Definition at line 72 of file class.ilObjOrgUnitTree.php.
References $ref_id, and loadArrayOfStaff().
Referenced by getEmployees(), and getSuperiors().
|
private |
Definition at line 76 of file class.ilObjOrgUnitTree.php.
References $ref_id, getAllChildren(), and loadArrayOfStaff().
Referenced by getEmployees(), and getSuperiors().
|
private |
Definition at line 29 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 35 of file class.ilObjOrgUnitTree.php.
|
staticprivate |
Definition at line 14 of file class.ilObjOrgUnitTree.php.
Referenced by _getInstance().
|
private |
Definition at line 32 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 20 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 17 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 23 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 26 of file class.ilObjOrgUnitTree.php.