ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
getAssignements (int $ref_id, ilOrgUnitPosition $ilOrgUnitPosition) | |
getAssignedUsers (array $orgu_ids, int $position_id) | |
getEmployees (int $ref_id, bool $recursive=false) | |
getSuperiors (int $ref_id, bool $recursive=false) | |
getAllChildren (int $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 (string $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 (int $level) | |
getEmployeesUnderUser (int $user_id, bool $recursive=true) | |
getSuperiorsOfUser (int $user_id, bool $recursive=true) | |
getLevelXOfUser (int $user_id, int $level) | |
for additional info see the other getLevelX method. More... | |
getOrgUnitOfUser (int $user_id) | |
buildTempTableWithUsrAssignements (string $temporary_table_name='orgu_usr_assignements') | |
Creates a temporary table with all orgu/user assignements. More... | |
dropTempTable (string $temporary_table_name) | |
getTitles (array $org_refs) | |
getEmployeeRoles () | |
getSuperiorRoles () | |
flushCache () | |
getLevelXOfTreenode (int $orgu_ref, int $level) | |
Specify eg. More... | |
getParent (int $orgu_ref) | |
Static Public Member Functions | |
static | _getInstance () |
Protected Member Functions | |
getPositionRepo () | |
getAssignmentRepo () | |
Protected Attributes | |
ilOrgUnitPositionDBRepository | $positionRepo |
ilOrgUnitUserAssignmentDBRepository | $assignmentRepo |
Static Protected Attributes | |
static string | $temporary_table_name_getOrgUnitOfUser = null |
static string | $temporary_table_name = null |
static ilObjOrgUnitTree | $instance = null |
Private Member Functions | |
__construct () | |
loadArrayOfStaff (string $title, array $ref_ids) | |
getChildren (int $ref_id) | |
loadChildren (int $ref_id) | |
loadRoles (string $role) | |
loadRolesQuery (string $role) | |
getRefIdFromRoleTitle (string $role_title) | |
Private Attributes | |
array | $roles |
array | $role_to_orgu |
$staff | |
array | $tree_childs = [] |
array | $parent = [] |
ilDBInterface | $db |
ilObjUser | $ilUser |
ilTree | $tree |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilObjOrgUnitTree Implements a singleton pattern for caching.
Definition at line 25 of file class.ilObjOrgUnitTree.php.
|
private |
|
static |
Definition at line 56 of file class.ilObjOrgUnitTree.php.
References null.
Referenced by ilOrgUnitExtension\__construct(), ilLikeUserOrgUnitSearch\__construct(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ilOrgUnitUserAssignmentGUI\assignmentsRecursive(), ilMStShowUserCoursesTableGUI\fillRow(), ilMStListCoursesTableGUI\fillRow(), ilOrgUnitUserAssignmentDBRepository\getOrgUnitsByUserAndPosition(), ilStudyProgrammeMembershipSourceReaderFactory\getReaderFor(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), and ilOrgUnitPathStorage\store().
ilObjOrgUnitTree::buildTempTableWithUsrAssignements | ( | string | $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 411 of file class.ilObjOrgUnitTree.php.
References $q, $temporary_table_name, dropTempTable(), and null.
ilObjOrgUnitTree::dropTempTable | ( | string | $temporary_table_name | ) |
Definition at line 436 of file class.ilObjOrgUnitTree.php.
References $q, $temporary_table_name, and null.
Referenced by buildTempTableWithUsrAssignements().
ilObjOrgUnitTree::flushCache | ( | ) |
Definition at line 487 of file class.ilObjOrgUnitTree.php.
References null.
ilObjOrgUnitTree::getAllChildren | ( | int | $ref_id | ) |
Definition at line 186 of file class.ilObjOrgUnitTree.php.
References getChildren().
Referenced by getEmployees(), and getSuperiors().
ilObjOrgUnitTree::getAllOrgunitsOnLevelX | ( | int | $level | ) |
Definition at line 293 of file class.ilObjOrgUnitTree.php.
References getChildren(), and ilObjOrgUnit\getRootOrgRefId().
ilObjOrgUnitTree::getAssignedUsers | ( | array | $orgu_ids, |
int | $position_id | ||
) |
int[] | $orgu_ids |
Definition at line 97 of file class.ilObjOrgUnitTree.php.
References getAssignmentRepo().
Referenced by getAssignements(), getEmployees(), getEmployeesUnderUser(), and getSuperiors().
ilObjOrgUnitTree::getAssignements | ( | int | $ref_id, |
ilOrgUnitPosition | $ilOrgUnitPosition | ||
) |
Definition at line 88 of file class.ilObjOrgUnitTree.php.
References getAssignedUsers(), and ilOrgUnitPosition\getId().
|
protected |
Definition at line 75 of file class.ilObjOrgUnitTree.php.
References $assignmentRepo, $dic, and ilOrgUnitLocalDIC\dic().
Referenced by getAssignedUsers(), getEmployeesUnderUser(), and getOrgUnitOfUser().
|
private |
Definition at line 274 of file class.ilObjOrgUnitTree.php.
References $ref_id, and loadChildren().
Referenced by getAllChildren(), and getAllOrgunitsOnLevelX().
ilObjOrgUnitTree::getEmployeeRoles | ( | ) |
Definition at line 464 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getEmployees | ( | int | $ref_id, |
bool | $recursive = false |
||
) |
int | $ref_id | the reference id of the organisational unit. |
bool | $recursive | if true you get the ids of the subsequent orgunits employees too |
Definition at line 106 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE, getAllChildren(), getAssignedUsers(), and getPositionRepo().
ilObjOrgUnitTree::getEmployeesUnderUser | ( | int | $user_id, |
bool | $recursive = true |
||
) |
bool | $recursive | if this is true subsequent orgunits of this users superior role get searched as well. |
Definition at line 316 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE, ilOrgUnitPosition\CORE_POSITION_SUPERIOR, getAssignedUsers(), getAssignmentRepo(), and getPositionRepo().
ilObjOrgUnitTree::getLevelXOfTreenode | ( | int | $orgu_ref, |
int | $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
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 527 of file class.ilObjOrgUnitTree.php.
References getParent(), and ilObjOrgUnit\getRootOrgRefId().
Referenced by getLevelXOfUser().
ilObjOrgUnitTree::getLevelXOfUser | ( | int | $user_id, |
int | $level | ||
) |
for additional info see the other getLevelX method.
int | $user_id |
Definition at line 366 of file class.ilObjOrgUnitTree.php.
References Vendor\Package\$e, $q, $res, and getLevelXOfTreenode().
ilObjOrgUnitTree::getOrgUnitOfUser | ( | int | $user_id | ) |
Definition at line 394 of file class.ilObjOrgUnitTree.php.
References getAssignmentRepo().
ilObjOrgUnitTree::getOrgusWhereUserHasPermissionForOperation | ( | $operation | ) |
If you want to have all orgunits where the current user has the write permission: use this with the parameter "write".
Definition at line 208 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getOrgusWhereUserHasPermissionForOperationId | ( | string | $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).
Definition at line 246 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getParent | ( | int | $orgu_ref | ) |
Definition at line 551 of file class.ilObjOrgUnitTree.php.
Referenced by getLevelXOfTreenode().
|
protected |
Definition at line 65 of file class.ilObjOrgUnitTree.php.
References $dic, $positionRepo, and ilOrgUnitLocalDIC\dic().
Referenced by getEmployees(), getEmployeesUnderUser(), and getSuperiors().
|
private |
Definition at line 504 of file class.ilObjOrgUnitTree.php.
Referenced by loadRolesQuery().
ilObjOrgUnitTree::getSuperiorRoles | ( | ) |
Definition at line 473 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getSuperiors | ( | int | $ref_id, |
bool | $recursive = false |
||
) |
int | $ref_id | the reference id of the organisational unit. |
bool | $recursive | if true you get the ids of the subsequent orgunits superiors too |
Definition at line 130 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_SUPERIOR, getAllChildren(), getAssignedUsers(), and getPositionRepo().
Referenced by getSuperiorsOfUser().
ilObjOrgUnitTree::getSuperiorsOfUser | ( | int | $user_id, |
bool | $recursive = true |
||
) |
bool | $recursive | if this is true subsequent orgunits of this users superior role get searched as well. |
Definition at line 340 of file class.ilObjOrgUnitTree.php.
References $q, $res, and getSuperiors().
ilObjOrgUnitTree::getTitles | ( | array | $org_refs | ) |
Definition at line 451 of file class.ilObjOrgUnitTree.php.
References ilObject\_lookupObjId(), and ilObject\_lookupTitle().
|
private |
string | $title | "employee" or "superior" |
int[] | $ref_ids array of orgu object ref ids. |
Definition at line 154 of file class.ilObjOrgUnitTree.php.
References $id, $q, $ref_id, $res, and loadRoles().
|
private |
Definition at line 280 of file class.ilObjOrgUnitTree.php.
References $ref_id.
Referenced by getChildren().
|
private |
Definition at line 480 of file class.ilObjOrgUnitTree.php.
References loadRolesQuery(), and null.
Referenced by getEmployeeRoles(), getSuperiorRoles(), and loadArrayOfStaff().
|
private |
Definition at line 492 of file class.ilObjOrgUnitTree.php.
References $q, $res, and getRefIdFromRoleTitle().
Referenced by loadRoles().
|
protected |
Definition at line 44 of file class.ilObjOrgUnitTree.php.
Referenced by getAssignmentRepo().
|
private |
Definition at line 40 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 41 of file class.ilObjOrgUnitTree.php.
|
staticprotected |
Definition at line 29 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 39 of file class.ilObjOrgUnitTree.php.
|
protected |
Definition at line 43 of file class.ilObjOrgUnitTree.php.
Referenced by getPositionRepo().
|
private |
Definition at line 33 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 31 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 35 of file class.ilObjOrgUnitTree.php.
|
staticprotected |
Definition at line 28 of file class.ilObjOrgUnitTree.php.
Referenced by buildTempTableWithUsrAssignements(), and dropTempTable().
|
staticprotected |
Definition at line 27 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 42 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 37 of file class.ilObjOrgUnitTree.php.