ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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...
 
 getTotalRowCount (?array $filter_data, ?array $additional_parameters)
 
 getRows (Table\DataRowBuilder $row_builder, array $visible_column_ids, Range $range, Order $order, ?array $filter_data, ?array $additional_parameters)
 

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)
 
 getUserDataByOrgUnitsAndPosition (array $orgu_ids, int $position_id, bool $count_only=false, ?Range $range=null, ?Order $order=null)
 
- 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 160 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\deleteByUser().

160  : void
161  {
162  $this->deleteByUser($user_id);
163  }
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 52 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\find().

53  {
54  $assignment = $this->find($user_id, $position_id, $orgu_id);
55  if (!$assignment) {
56  throw new ilException('UserAssignment not found');
57  }
58  return $assignment;
59  }
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 64 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByUsers().

64  : array
65  {
66  return $this->getByUsers([$user_id]);
67  }
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 80 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByUserAndPosition().

80  : array
81  {
82  return $this->getByUserAndPosition($user_id, $position_id);
83  }
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 72 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByUsers().

72  : array
73  {
74  return $this->getByUsers($user_ids);
75  }
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 30 of file class.ilOrgUnitUserAssignmentQueries.php.

References $DIC.

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

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

◆ getOrgUnitIdsofUser()

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

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

References ilOrgUnitUserAssignmentDBRepository\getOrgUnitsByUser().

128  : array
129  {
130  return $this->getOrgUnitsByUser($user_id);
131  }
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 136 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getOrgUnitsByUserAndPosition().

136  : array
137  {
138  return $this->getOrgUnitsByUserAndPosition($user_id, $position_id, $recursive);
139  }
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 43 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getPositionsByUser().

43  : array
44  {
45  return $this->getPositionsByUser($user_id);
46  }
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 152 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getByPosition().

152  : array
153  {
154  return $this->getByPosition($position_id);
155  }
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 88 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByOrgUnits().

88  : array
89  {
90  return $this->getUsersByOrgUnits([$orgu_id]);
91  }
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 96 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByOrgUnits().

96  : array
97  {
98  return $this->getUsersByOrgUnits($orgu_ids);
99  }
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 112 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByOrgUnitsAndPosition().

112  : array
113  {
114  return $this->getUsersByOrgUnitsAndPosition($orgu_ids, $position_id);
115  }
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 104 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByUserAndPosition().

104  : array
105  {
106  return $this->getUsersByUserAndPosition($user_id, $position_id, $recursive);
107  }
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 144 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getUsersByPosition().

144  : array
145  {
146  return $this->getUsersByPosition($position_id);
147  }
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 120 of file class.ilOrgUnitUserAssignmentQueries.php.

References ilOrgUnitUserAssignmentDBRepository\getFilteredUsersByUserAndPosition().

120  : array
121  {
122  return $this->getFilteredUsersByUserAndPosition($user_id, $position_id, $users_position_id, $recursive);
123  }
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 28 of file class.ilOrgUnitUserAssignmentQueries.php.


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