19 declare(strict_types=1);
32 if (!isset(self::$instance)) {
34 self::$instance =
new self($DIC[
"ilDB"]);
37 return self::$instance;
54 $assignment = $this->
find($user_id, $position_id, $orgu_id);
getUsersByPosition(int $position_id)
Get all users with a certain position.
getUserAssignmentsOfPosition(int $position_id)
getPositionsByUser(int $user_id)
Get all positions a user is assigned to.
static ilOrgUnitUserAssignmentQueries $instance
getUserIdsOfOrgUnit(int $orgu_id)
getFilteredUsersByUserAndPosition(int $user_id, int $position_id, int $position_filter_id, bool $recursive=false)
Get all users with position $position_filter_id from those org-units, where the user has position $po...
getUsersByOrgUnits(array $orgu_ids)
Get all users for a given set of org-units.
getByUserAndPosition(int $user_id, int $position_id)
Get assignments for a user in a dedicated position.
getAssignmentsOfUserIdAndPosition(int $user_id, int $position_id)
getOrgUnitsByUser(int $user_id)
Get all org-units a user is assigned to.
deleteByUser(int $user_id)
Delete all assignments for a user_id Returns false if no assignments were found.
getUsersByUserAndPosition(int $user_id, int $position_id, bool $recursive=false)
Get all users from org-units where the user has a certain position i.e.
getUserIdsOfOrgUnits(array $orgu_ids)
getOrgUnitIdsOfUsersPosition(int $position_id, int $user_id, bool $recursive=false)
getOrgUnitIdsofUser(int $user_id)
deleteAllAssignmentsOfUser(int $user_id)
getAssignmentOrFail(int $user_id, int $position_id, int $orgu_id)
getAssignmentsOfUserId(int $user_id)
find(int $user_id, int $position_id, int $orgu_id)
Find assignment for user, position and org-unit Does not create new assigment, returns null if no ass...
getUserIdsOfOrgUnitsInPosition(array $orgu_ids, int $position_id)
getAssignmentsOfUserIds(array $user_ids)
getUserIdsOfOrgUnitsOfUsersPosition(int $position_id, int $user_id, bool $recursive=false)
getPositionsOfUserId(int $user_id)
getByPosition(int $position_id)
Get all assignments for a position.
getOrgUnitsByUserAndPosition(int $user_id, int $position_id, bool $recursive=false)
Get all org-units where a user has a dedicated position.
getUsersByOrgUnitsAndPosition(array $orgu_ids, int $position_id)
Get all users in a specific position for a given set of org-units.
getUserIdsOfUsersOrgUnitsInPosition(int $user_id, int $users_position_id, int $position_id, bool $recursive=false)
getUserIdsOfPosition(int $position_id)
getByUsers(array $user_ids)
Get assignments for one or more users.