22 if (!isset(self::$instance)) {
23 self::$instance =
new self();
26 return self::$instance;
35 public function getPositionsOfUserId($user_id)
42 $positions[] = ilOrgUnitPosition::find($assignment->getPositionId());
60 'user_id' => $user_id,
61 'position_id' => $position_id,
62 'orgu_id' => $orgu_id,
96 'user_id' => $user_id,
97 'position_id' => $position_id
110 ->getArray(null,
'user_id');
122 ->getArray(null,
'user_id');
138 ->getArray(null,
'user_id');
151 'orgu_id' => $orgu_ids,
152 'position_id' => $position_id,
153 ])->getArray(null,
'user_id');
170 'position_id' => $position_id,
171 ])->getArray(null,
'user_id');
186 'position_id' => $position_id,
187 'user_id' => $user_id,
188 ])->getArray(null,
'orgu_id');
194 $recursive_orgu_ids = [];
196 foreach ($orgu_ids as $orgu_id) {
197 $recursive_orgu_ids = $recursive_orgu_ids + $tree->getAllChildren($orgu_id);
200 return $recursive_orgu_ids;
212 'position_id' => $position_id,
213 ])->getArray(null,
'user_id');
225 'position_id' => $position_id,
238 $q =
"DELETE FROM il_orgu_ua WHERE user_id = " . $DIC->database()->quote($user_id,
"integer");
239 $DIC->database()->manipulate($q);
getUserIdsOfOrgUnitsInPosition(array $orgu_ids, $position_id)
deleteAllAssignmentsOfUser($user_id)
getUserIdsOfOrgUnit($orgunit_ref_id)
getAssignmentsOfUserId($user_id)
static where($where, $operator=null)
getAssignmentsOfUserIdAndPosition(int $user_id, int $position_id)
getAssignmentOrFail($user_id, $position_id, $orgu_id)
getOrgUnitIdsOfUsersPosition($position_id, $user_id, $recursive=false)
getUserIdsOfUsersOrgUnitsInPosition($user_id, $users_position_id, $position_id, $recursive=false)
getUserAssignmentsOfPosition($position_id)
getUserIdsOfOrgUnits(array $orgunit_ref_id)
filterUserIdsDueToAuthorities($user_id, array $user_ids)
getUserIdsOfPosition($position_id)
getUserIdsOfOrgUnitsOfUsersPosition($position_id, $user_id, $recursive=false)