ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilOrgUnitUserAssignmentQueries Class Reference

Class ilOrgUnitUserAssignmentQueries. More...

+ Inheritance diagram for ilOrgUnitUserAssignmentQueries:
+ Collaboration diagram for ilOrgUnitUserAssignmentQueries:

Public Member Functions

 getPositionsOfUserId (int $user_id)
 
 getAssignmentOrFail (int $user_id, int $position_id, int $orgu_id)
 
 getAssignmentsOfUserId (int $user_id)
 
 getAssignmentsOfUserIds (array $user_ids)
 
 getAssignmentsOfUserIdAndPosition (int $user_id, int $position_id)
 
 getUserIdsOfOrgUnit (int $orgu_id)
 
 getUserIdsOfOrgUnits (array $orgu_ids)
 
 getUserIdsOfOrgUnitsOfUsersPosition (int $position_id, int $user_id, bool $recursive=false)
 
 getUserIdsOfOrgUnitsInPosition (array $orgu_ids, int $position_id)
 
 getUserIdsOfUsersOrgUnitsInPosition (int $user_id, int $users_position_id, int $position_id, bool $recursive=false)
 
 getOrgUnitIdsofUser (int $user_id)
 
 getOrgUnitIdsOfUsersPosition (int $position_id, int $user_id, bool $recursive=false)
 
 getUserIdsOfPosition (int $position_id)
 
 getUserAssignmentsOfPosition (int $position_id)
 
 deleteAllAssignmentsOfUser (int $user_id)
 
- Public Member Functions inherited from ilOrgUnitUserAssignmentDBRepository
 __construct (ilDBInterface $db, ilAppEventHandler $handler=null)
 
 get (int $user_id, int $position_id, int $orgu_id)
 Get existing user assignment or create a new one. More...
 
 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 assignment exists. More...
 
 store (ilOrgUnitUserAssignment $assignment)
 Store assignment to db. More...
 
 delete (ilOrgUnitUserAssignment $assignment)
 Delete a single assignment Returns false if no assignment was found. More...
 
 deleteByUser (int $user_id)
 Delete all assignments for a user_id Returns false if no assignments were found. More...
 
 getByUsers (array $user_ids)
 Get assignments for one or more users. More...
 
 getByPosition (int $position_id)
 Get all assignments for a position. More...
 
 getByOrgUnit (int $orgu_id)
 Get all assignments for an org-unit. More...
 
 getByUserAndPosition (int $user_id, int $position_id)
 Get assignments for a user in a dedicated position. More...
 
 getUsersByOrgUnits (array $orgu_ids)
 Get all users for a given set of org-units. More...
 
 getUsersByPosition (int $position_id)
 Get all users with a certain position. More...
 
 getUsersByOrgUnitsAndPosition (array $orgu_ids, int $position_id)
 Get all users in a specific position for a given set of org-units. More...
 
 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. More...
 
 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 $position_id i.e. More...
 
 getOrgUnitsByUser (int $user_id)
 Get all org-units a user is assigned to. More...
 
 getOrgUnitsByUserAndPosition (int $user_id, int $position_id, bool $recursive=false)
 Get all org-units where a user has a dedicated position. More...
 
 getPositionsByUser (int $user_id)
 Get all positions a user is assigned to. More...
 
 getSuperiorsByUsers (array $user_ids)
 Get all superiors of one or more users $user_id => [ $superior_ids ]. More...
 

Static Public Member Functions

static getInstance ()
 

Static Protected Attributes

static ilOrgUnitUserAssignmentQueries $instance
 

Additional Inherited Members

- Data Fields inherited from ilOrgUnitUserAssignmentDBRepository
const TABLE_NAME = 'il_orgu_ua'
 
- Protected Member Functions inherited from ilOrgUnitUserAssignmentDBRepository
 getPositionRepo ()
 
 insert (ilOrgUnitUserAssignment $assignment)
 
 update (ilOrgUnitUserAssignment $assignment)
 
 raiseEvent (string $event, ilOrgUnitUserAssignment $assignment)
 
- Protected Attributes inherited from ilOrgUnitUserAssignmentDBRepository
ilDBInterface $db
 
ilAppEventHandler $ilAppEventHandler
 
ilOrgUnitPositionDBRepository $positionRepo
 

Detailed Description

Member Function Documentation

◆ deleteAllAssignmentsOfUser()

ilOrgUnitUserAssignmentQueries::deleteAllAssignmentsOfUser ( int  $user_id)
Deprecated:
Please use deleteByUser() from OrgUnitUserAssignmentRepository

Definition at line 159 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\deleteByUser().

159  : void
160  {
161  $this->deleteByUser($user_id);
162  }
deleteByUser(int $user_id)
Delete all assignments for a user_id Returns false if no assignments were found.
+ Here is the call graph for this function:

◆ getAssignmentOrFail()

ilOrgUnitUserAssignmentQueries::getAssignmentOrFail ( int  $user_id,
int  $position_id,
int  $orgu_id 
)
Deprecated:
Please use find() from OrgUnitUserAssignmentRepository
Exceptions
ilException

Definition at line 51 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\find().

52  {
53  $assignment = $this->find($user_id, $position_id, $orgu_id);
54  if (!$assignment) {
55  throw new ilException('UserAssignment not found');
56  }
57  return $assignment;
58  }
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...
+ Here is the call graph for this function:

◆ getAssignmentsOfUserId()

ilOrgUnitUserAssignmentQueries::getAssignmentsOfUserId ( int  $user_id)
Deprecated:
Please use getByUsers() from OrgUnitUserAssignmentRepository

Definition at line 63 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByUsers().

63  : array
64  {
65  return $this->getByUsers([$user_id]);
66  }
getByUsers(array $user_ids)
Get assignments for one or more users.
+ Here is the call graph for this function:

◆ getAssignmentsOfUserIdAndPosition()

ilOrgUnitUserAssignmentQueries::getAssignmentsOfUserIdAndPosition ( int  $user_id,
int  $position_id 
)
Deprecated:
Please use getByUserAndPosition() from OrgUnitUserAssignmentRepository

Definition at line 79 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByUserAndPosition().

79  : array
80  {
81  return $this->getByUserAndPosition($user_id, $position_id);
82  }
getByUserAndPosition(int $user_id, int $position_id)
Get assignments for a user in a dedicated position.
+ Here is the call graph for this function:

◆ getAssignmentsOfUserIds()

ilOrgUnitUserAssignmentQueries::getAssignmentsOfUserIds ( array  $user_ids)
Deprecated:
Please use getByUsers() from OrgUnitUserAssignmentRepository

Definition at line 71 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByUsers().

71  : array
72  {
73  return $this->getByUsers($user_ids);
74  }
getByUsers(array $user_ids)
Get assignments for one or more users.
+ Here is the call graph for this function:

◆ getInstance()

static ilOrgUnitUserAssignmentQueries::getInstance ( )
static

Definition at line 29 of file class.ilOrgUnitUserAssignmentQueries.php.

References $DIC.

Referenced by ilObjEmployeeTalkAccess\__construct(), ilObjUser\delete(), ILIAS\MyStaff\ilMyStaffAccess\getIdsForUserAndOperation(), ILIAS\MyStaff\ilMyStaffAccess\getUsersForUserPerPosition(), and ilRepositorySearchGUI\listUsers().

29  : self
30  {
31  if (!isset(self::$instance)) {
32  global $DIC;
33  self::$instance = new self($DIC["ilDB"]);
34  }
35 
36  return self::$instance;
37  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ getOrgUnitIdsofUser()

ilOrgUnitUserAssignmentQueries::getOrgUnitIdsofUser ( int  $user_id)
Deprecated:
Please use getOrgUnitsByUser() from OrgUnitUserAssignmentRepository

Definition at line 127 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getOrgUnitsByUser().

127  : array
128  {
129  return $this->getOrgUnitsByUser($user_id);
130  }
getOrgUnitsByUser(int $user_id)
Get all org-units a user is assigned to.
+ Here is the call graph for this function:

◆ getOrgUnitIdsOfUsersPosition()

ilOrgUnitUserAssignmentQueries::getOrgUnitIdsOfUsersPosition ( int  $position_id,
int  $user_id,
bool  $recursive = false 
)
Deprecated:
Please use getOrgUnitsByUserAndPosition() from OrgUnitUserAssignmentRepository

Definition at line 135 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getOrgUnitsByUserAndPosition().

135  : array
136  {
137  return $this->getOrgUnitsByUserAndPosition($user_id, $position_id, $recursive);
138  }
getOrgUnitsByUserAndPosition(int $user_id, int $position_id, bool $recursive=false)
Get all org-units where a user has a dedicated position.
+ Here is the call graph for this function:

◆ getPositionsOfUserId()

ilOrgUnitUserAssignmentQueries::getPositionsOfUserId ( int  $user_id)
Deprecated:
Please use getPositionsByUser() from OrgUnitUserAssignmentRepository

Definition at line 42 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getPositionsByUser().

42  : array
43  {
44  return $this->getPositionsByUser($user_id);
45  }
getPositionsByUser(int $user_id)
Get all positions a user is assigned to.
+ Here is the call graph for this function:

◆ getUserAssignmentsOfPosition()

ilOrgUnitUserAssignmentQueries::getUserAssignmentsOfPosition ( int  $position_id)
Deprecated:
Please use getByPosition() from OrgUnitUserAssignmentRepository

Definition at line 151 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByPosition().

151  : array
152  {
153  return $this->getByPosition($position_id);
154  }
getByPosition(int $position_id)
Get all assignments for a position.
+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnit()

ilOrgUnitUserAssignmentQueries::getUserIdsOfOrgUnit ( int  $orgu_id)
Deprecated:
Please use getUsersByOrgUnits() from OrgUnitUserAssignmentRepository

Definition at line 87 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByOrgUnits().

87  : array
88  {
89  return $this->getUsersByOrgUnits([$orgu_id]);
90  }
getUsersByOrgUnits(array $orgu_ids)
Get all users for a given set of org-units.
+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnits()

ilOrgUnitUserAssignmentQueries::getUserIdsOfOrgUnits ( array  $orgu_ids)
Deprecated:
Please use getUsersByOrgUnits() from OrgUnitUserAssignmentRepository

Definition at line 95 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByOrgUnits().

95  : array
96  {
97  return $this->getUsersByOrgUnits($orgu_ids);
98  }
getUsersByOrgUnits(array $orgu_ids)
Get all users for a given set of org-units.
+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnitsInPosition()

ilOrgUnitUserAssignmentQueries::getUserIdsOfOrgUnitsInPosition ( array  $orgu_ids,
int  $position_id 
)
Deprecated:
Please use getUsersByOrgUnitsAndPosition() from OrgUnitUserAssignmentRepository

Definition at line 111 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByOrgUnitsAndPosition().

111  : array
112  {
113  return $this->getUsersByOrgUnitsAndPosition($orgu_ids, $position_id);
114  }
getUsersByOrgUnitsAndPosition(array $orgu_ids, int $position_id)
Get all users in a specific position for a given set of org-units.
+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnitsOfUsersPosition()

ilOrgUnitUserAssignmentQueries::getUserIdsOfOrgUnitsOfUsersPosition ( int  $position_id,
int  $user_id,
bool  $recursive = false 
)
Deprecated:
Please use getUsersByUserAndPosition() from OrgUnitUserAssignmentRepository

Definition at line 103 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByUserAndPosition().

103  : array
104  {
105  return $this->getUsersByUserAndPosition($user_id, $position_id, $recursive);
106  }
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.
+ Here is the call graph for this function:

◆ getUserIdsOfPosition()

ilOrgUnitUserAssignmentQueries::getUserIdsOfPosition ( int  $position_id)
Deprecated:
Please use getUsersByPosition() from OrgUnitUserAssignmentRepository

Definition at line 143 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByPosition().

143  : array
144  {
145  return $this->getUsersByPosition($position_id);
146  }
getUsersByPosition(int $position_id)
Get all users with a certain position.
+ Here is the call graph for this function:

◆ getUserIdsOfUsersOrgUnitsInPosition()

ilOrgUnitUserAssignmentQueries::getUserIdsOfUsersOrgUnitsInPosition ( int  $user_id,
int  $users_position_id,
int  $position_id,
bool  $recursive = false 
)
Deprecated:
Please use getFilteredUsersByUserAndPosition() from OrgUnitUserAssignmentRepository

Definition at line 119 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getFilteredUsersByUserAndPosition().

119  : array
120  {
121  return $this->getFilteredUsersByUserAndPosition($user_id, $position_id, $users_position_id, $recursive);
122  }
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...
+ Here is the call graph for this function:

Field Documentation

◆ $instance

ilOrgUnitUserAssignmentQueries ilOrgUnitUserAssignmentQueries::$instance
staticprotected

Definition at line 27 of file class.ilOrgUnitUserAssignmentQueries.php.


The documentation for this class was generated from the following file: