ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Class ilObjOrgUnitTree Implements a singleton pattern for caching. More...
Public Member Functions | |
getEmployees ($ref_id, $recursive=false) | |
getAssignements ($ref_id, ilOrgUnitPosition $ilOrgUnitPosition) | |
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) | |
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_namgetOrgUnitOfUsere = null |
static | $temporary_table_name |
Private Member Functions | |
__construct () | |
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 12 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 53 of file class.ilObjOrgUnitTree.php.
|
static |
Definition at line 68 of file class.ilObjOrgUnitTree.php.
Referenced by ilLikeUserOrgUnitSearch\__construct(), ilOrgUnitExtension\__construct(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ilOrgUnitStaffTableGUI\fillRow(), ilOrgUnitUserAssignmentQueries\getOrgUnitIdsOfUsersPosition(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getOrgUnitIdsOfUsersPosition(), ilStudyProgrammeMembershipSourceReaderFactory\getReaderFor(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilOrgUnitRecursiveUserAssignmentTableGUI\loadData(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilOrgUnitUserAssignmentTableGUI\parseData(), 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:
string | $temporary_table_name |
ilException |
Definition at line 475 of file class.ilObjOrgUnitTree.php.
References $temporary_table_name, and dropTempTable().
ilObjOrgUnitTree::dropTempTable | ( | $temporary_table_name | ) |
$temporary_table_name |
Definition at line 506 of file class.ilObjOrgUnitTree.php.
References $temporary_table_name.
Referenced by buildTempTableWithUsrAssignements().
ilObjOrgUnitTree::flushCache | ( | ) |
Definition at line 571 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getAllChildren | ( | $ref_id | ) |
$ref_id |
Definition at line 188 of file class.ilObjOrgUnitTree.php.
References getChildren().
Referenced by getEmployees(), getEmployeesUnderUser(), and getSuperiors().
ilObjOrgUnitTree::getAllOrgunitsOnLevelX | ( | $level | ) |
$level |
Definition at line 321 of file class.ilObjOrgUnitTree.php.
References getChildren(), and ilObjOrgUnit\getRootOrgRefId().
ilObjOrgUnitTree::getAssignements | ( | $ref_id, | |
ilOrgUnitPosition | $ilOrgUnitPosition | ||
) |
int | $ref_id | |
\ilOrgUnitPosition | $ilOrgUnitPosition |
Definition at line 108 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\getId(), and ActiveRecord\where().
Referenced by getEmployees(), and getSuperiors().
|
private |
$ref_id |
Definition at line 291 of file class.ilObjOrgUnitTree.php.
References loadChildren().
Referenced by getAllChildren(), and getAllOrgunitsOnLevelX().
ilObjOrgUnitTree::getEmployeeRoles | ( | ) |
Definition at line 541 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 84 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE, getAllChildren(), getAssignements(), ilOrgUnitPosition\getCorePosition(), and ilOrgUnitUserAssignmentQueries\getInstance().
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 347 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE, ilOrgUnitPosition\CORE_POSITION_SUPERIOR, getAllChildren(), and ilOrgUnitUserAssignmentQueries\getInstance().
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 626 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 412 of file class.ilObjOrgUnitTree.php.
References Vendor\Package\$e, $res, and getLevelXOfTreenode().
ilObjOrgUnitTree::getOrgUnitOfUser | ( | $user_id | ) |
getOrgUnitOfUser
$user_id | ||
int | $ref_id | if given, only OrgUnits under this ID are returned (including $ref_id) |
Definition at line 446 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitUserAssignmentQueries\getInstance().
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 214 of file class.ilObjOrgUnitTree.php.
References $DIC, $ilUser, and $res.
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 258 of file class.ilObjOrgUnitTree.php.
References $DIC, $ilUser, and $res.
ilObjOrgUnitTree::getParent | ( | $orgu_ref | ) |
$orgu_ref | int |
Definition at line 656 of file class.ilObjOrgUnitTree.php.
Referenced by getLevelXOfTreenode(), and ilOrgUnitRecursiveUserAssignmentTableGUI\mayViewLPIn().
|
private |
$role_title |
Definition at line 598 of file class.ilObjOrgUnitTree.php.
Referenced by loadRolesQuery().
ilObjOrgUnitTree::getSuperiorRoles | ( | ) |
Definition at line 552 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 123 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_SUPERIOR, getAllChildren(), getAssignements(), and ilOrgUnitPosition\getCorePosition().
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 382 of file class.ilObjOrgUnitTree.php.
References $res, and getSuperiors().
ilObjOrgUnitTree::getTitles | ( | $org_refs | ) |
$org_refs |
Definition at line 527 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 149 of file class.ilObjOrgUnitTree.php.
References $res, and loadRoles().
|
private |
$ref_id |
Definition at line 302 of file class.ilObjOrgUnitTree.php.
Referenced by getChildren().
|
private |
$role |
Definition at line 563 of file class.ilObjOrgUnitTree.php.
References loadRolesQuery().
Referenced by getEmployeeRoles(), getSuperiorRoles(), and loadArrayOfStaff().
|
private |
$role |
Definition at line 580 of file class.ilObjOrgUnitTree.php.
References $res, and getRefIdFromRoleTitle().
Referenced by loadRoles().
|
private |
Definition at line 50 of file class.ilObjOrgUnitTree.php.
|
staticprivate |
Definition at line 26 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 46 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 34 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 30 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 38 of file class.ilObjOrgUnitTree.php.
|
staticprotected |
Definition at line 22 of file class.ilObjOrgUnitTree.php.
Referenced by buildTempTableWithUsrAssignements(), and dropTempTable().
|
staticprotected |
Definition at line 18 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 42 of file class.ilObjOrgUnitTree.php.