ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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". More... | |
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). More... | |
getAllOrgunitsOnLevelX ($level) | |
getEmployeesUnderUser ($user_id, $recursive=true) | |
getSuperiorsOfUser ($user_id, $recursive=true) | |
getLevelXOfUser ($user_id, $level) | |
for additional info see the other getLevelX method. More... | |
getOrgUnitOfUser ($user_id, $ref_id=0) | |
getOrgUnitOfUser More... | |
buildTempTableWithUsrAssignements ($temporary_table_name='orgu_usr_assignements') | |
Creates a temporary table with all orgu/user assignements. More... | |
dropTempTable ($temporary_table_name) | |
getTitles ($org_refs) | |
getEmployeeRoles () | |
getSuperiorRoles () | |
flushCache () | |
getLevelXOfTreenode ($orgu_ref, $level) | |
Specify eg. More... | |
getParent ($orgu_ref) | |
Static Public Member Functions | |
static | _getInstance () |
Static Protected Attributes | |
static | $temporary_table_name = null |
Private Member Functions | |
__construct () | |
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 | |
$parent | |
$db | |
Static Private Attributes | |
static | $instance |
Class ilObjOrgUnitTree Implements a singleton pattern for caching.
Definition at line 13 of file class.ilObjOrgUnitTree.php.
|
private |
|
static |
Definition at line 63 of file class.ilObjOrgUnitTree.php.
Referenced by ilLikeUserOrgUnitSearch\__construct(), ilOrgUnitExtension\__construct(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ilUserSearchOptions\_getSearchableFieldsInfo(), ilOrgUnitStaffTableGUI\fillRow(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilParticipantTableGUI\initFilter(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilOrgUnitStaffTableGUI\parseData(), ilOrgUnitStaffTableGUI\setRowForUser(), and ilOrgUnitPathStorage\store().
ilObjOrgUnitTree::buildTempTableWithUsrAssignements | ( | $temporary_table_name = 'orgu_usr_assignements' | ) |
Creates a temporary table with all orgu/user assignements.
there will be three columns in the table orgu_usr_assignements (or specified table-name): ref_id: Reference-IDs of OrgUnits user_id: Assigned User-IDs path: Path-representation of the OrgUnit
Usage:
ilException |
string | $temporary_table_name |
Definition at line 422 of file class.ilObjOrgUnitTree.php.
References $temporary_table_name, and dropTempTable().
ilObjOrgUnitTree::dropTempTable | ( | $temporary_table_name | ) |
$temporary_table_name |
Definition at line 451 of file class.ilObjOrgUnitTree.php.
References $temporary_table_name.
Referenced by buildTempTableWithUsrAssignements().
ilObjOrgUnitTree::flushCache | ( | ) |
Definition at line 508 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getAllChildren | ( | $ref_id | ) |
$ref_id |
Definition at line 149 of file class.ilObjOrgUnitTree.php.
References $ref_id, array, and getChildren().
Referenced by getOrgUnitOfUser(), and loadStaffRecursive().
ilObjOrgUnitTree::getAllOrgunitsOnLevelX | ( | $level | ) |
$level |
Definition at line 272 of file class.ilObjOrgUnitTree.php.
References array, getChildren(), and ilObjOrgUnit\getRootOrgRefId().
|
private |
$ref_id |
Definition at line 245 of file class.ilObjOrgUnitTree.php.
References $ref_id, and loadChildren().
Referenced by getAllChildren(), and getAllOrgunitsOnLevelX().
ilObjOrgUnitTree::getEmployeeRoles | ( | ) |
Definition at line 481 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 77 of file class.ilObjOrgUnitTree.php.
References $ref_id, loadStaff(), and loadStaffRecursive().
Referenced by ilOrgUnitExtension\getEmployees(), and 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 294 of file class.ilObjOrgUnitTree.php.
References $res, array, 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 557 of file class.ilObjOrgUnitTree.php.
References array, 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 349 of file class.ilObjOrgUnitTree.php.
References $res, array, 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 381 of file class.ilObjOrgUnitTree.php.
References $ref_id, $res, array, 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 172 of file class.ilObjOrgUnitTree.php.
References $DIC, $ilUser, $res, and array.
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 214 of file class.ilObjOrgUnitTree.php.
References $DIC, $ilUser, $res, and array.
ilObjOrgUnitTree::getParent | ( | $orgu_ref | ) |
$orgu_ref | int |
Definition at line 585 of file class.ilObjOrgUnitTree.php.
Referenced by getLevelXOfTreenode().
|
private |
$role_title |
Definition at line 532 of file class.ilObjOrgUnitTree.php.
Referenced by loadRolesQuery().
ilObjOrgUnitTree::getSuperiorRoles | ( | ) |
Definition at line 491 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getSuperiors | ( | $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 superiors too |
Definition at line 87 of file class.ilObjOrgUnitTree.php.
References $ref_id, loadStaff(), and loadStaffRecursive().
Referenced by ilOrgUnitExtension\getSuperiors(), and 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 320 of file class.ilObjOrgUnitTree.php.
References $res, array, and getSuperiors().
ilObjOrgUnitTree::getTitles | ( | $org_refs | ) |
$org_refs |
Definition at line 468 of file class.ilObjOrgUnitTree.php.
References $names, ilObject\_lookupObjId(), ilObject\_lookupTitle(), and array.
|
private |
$title | "employee" or "superior" |
$ref_ids | int[] array of orgu object ref ids. |
Definition at line 112 of file class.ilObjOrgUnitTree.php.
References $ref_id, $res, $title, array, and loadRoles().
Referenced by loadStaff(), and loadStaffRecursive().
|
private |
$ref_id |
Definition at line 255 of file class.ilObjOrgUnitTree.php.
References $ref_id, and array.
Referenced by getChildren().
|
private |
$role |
Definition at line 501 of file class.ilObjOrgUnitTree.php.
References loadRolesQuery().
Referenced by getEmployeeRoles(), getSuperiorRoles(), and loadArrayOfStaff().
|
private |
$role |
Definition at line 516 of file class.ilObjOrgUnitTree.php.
References $res, array, and getRefIdFromRoleTitle().
Referenced by loadRoles().
|
private |
$title | string "employee" or "superior" |
$ref_id | int ref id of org unit. |
Definition at line 97 of file class.ilObjOrgUnitTree.php.
References $ref_id, $title, array, and loadArrayOfStaff().
Referenced by getEmployees(), and getSuperiors().
|
private |
Definition at line 102 of file class.ilObjOrgUnitTree.php.
References $ref_id, $title, getAllChildren(), and loadArrayOfStaff().
Referenced by getEmployees(), and getSuperiors().
|
private |
Definition at line 46 of file class.ilObjOrgUnitTree.php.
|
staticprivate |
Definition at line 22 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 42 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 30 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 26 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 34 of file class.ilObjOrgUnitTree.php.
|
staticprotected |
Definition at line 18 of file class.ilObjOrgUnitTree.php.
Referenced by buildTempTableWithUsrAssignements(), and dropTempTable().
|
private |
Definition at line 38 of file class.ilObjOrgUnitTree.php.