ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository Class Reference
+ Collaboration diagram for OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository:

Public Member Functions

 findOrCreateAssignment (int $user_id, int $position_id, int $orgu_id)
 
 findAllUserAssingmentsByUserIds (array $arr_user_ids)
 
 getEmplSuperiorList (array $arr_empl_user_ids)
 
 getPositionsOfUserId (int $user_id)
 
 getAssignmentOrFail (int $user_id, int $position_id, int $orgu_id)
 
 getAssignmentsOfUserId (int $user_id)
 
 getUserIdsOfOrgUnit (int $orgunit_ref_id)
 
 getUserIdsOfOrgUnits (array $orgunit_ref_id)
 
 getUserIdsOfOrgUnitsOfUsersPosition (int $position_id, int $user_id, bool $recursive=false)
 
 getUserIdsOfOrgUnitsInPosition (array $orgu_ids, int $position_id)
 
 getUserIdsOfUsersOrgUnitsInPosition (int $user_id, array $users_position_id, int $position_id, bool $recursive=false)
 
 getOrgUnitIdsOfUsersPosition (int $position_id, int $user_id, bool $recursive=false)
 
 getUserIdsOfPosition (int $position_id)
 
 getUserAssignmentsOfPosition (int $position_id)
 
 deleteAllAssignmentsOfUser (int $user_id)
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 getAssignmentRepo ()
 

Protected Attributes

ilOrgUnitPositionDBRepository $positionRepo
 
ilOrgUnitUserAssignmentDBRepository $assignmentRepo
 

Static Protected Attributes

static self $instance
 

Private Member Functions

 getPositionRepo ()
 

Detailed Description

Definition at line 26 of file class.ilOrgUnitUserAssignmentRepository.php.

Member Function Documentation

◆ deleteAllAssignmentsOfUser()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::deleteAllAssignmentsOfUser ( int  $user_id)

◆ findAllUserAssingmentsByUserIds()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::findAllUserAssingmentsByUserIds ( array  $arr_user_ids)
Deprecated:
Please use getByUsers() from ilOrgUnitUserAssignmentDBRepository

Definition at line 72 of file class.ilOrgUnitUserAssignmentRepository.php.

72 : array
73 {
74 $assignments = $this->getAssignmentRepo()->getByUsers($arr_user_ids);
75
76 $user_assignment_list_by_user = [];
77 foreach ($assignments as $user_assignment) {
78 $user_assignment_list_by_user[$user_assignment->getUserId()][] = $user_assignment;
79 }
80
81 return $user_assignment_list_by_user;
82 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ findOrCreateAssignment()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::findOrCreateAssignment ( int  $user_id,
int  $position_id,
int  $orgu_id 
)
Deprecated:
Please use get() from ilOrgUnitUserAssignmentDBRepository

Definition at line 64 of file class.ilOrgUnitUserAssignmentRepository.php.

65 {
66 return $this->getAssignmentRepo()->get($user_id, $position_id, $orgu_id);
67 }
Class ilOrgUnitUserAssignment.

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getAssignmentOrFail()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getAssignmentOrFail ( int  $user_id,
int  $position_id,
int  $orgu_id 
)
Deprecated:
Please use get() from ilOrgUnitUserAssignmentDBRepository

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

104 {
105 $assignment = $this->getAssignmentRepo()->get($user_id, $position_id, $orgu_id);
106 if (!$assignment) {
107 throw new ilException('UserAssignment not found');
108 }
109 return $assignment;
110 }
Base class for ILIAS Exception handling.

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getAssignmentRepo()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getAssignmentRepo ( )
protected

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

52 {
53 if (!isset($this->assignmentRepo)) {
55 $this->assignmentRepo = $dic["repo.UserAssignments"];
56 }
57
59 }
$dic
Definition: ltiresult.php:33

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\$assignmentRepo, $dic, and ilOrgUnitLocalDIC\dic().

Referenced by OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\findAllUserAssingmentsByUserIds(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\findOrCreateAssignment(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentOrFail(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentsOfUserId(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getEmplSuperiorList(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getPositionsOfUserId(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getUserIdsOfOrgUnit(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getUserIdsOfOrgUnits(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getUserIdsOfOrgUnitsInPosition(), and OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getUserIdsOfOrgUnitsOfUsersPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAssignmentsOfUserId()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getAssignmentsOfUserId ( int  $user_id)
Deprecated:
Please use getByUsers() from ilOrgUnitUserAssignmentDBRepository

Definition at line 115 of file class.ilOrgUnitUserAssignmentRepository.php.

115 : array
116 {
117 return $this->getAssignmentRepo()->getByUsers([$user_id]);
118 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getEmplSuperiorList()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getEmplSuperiorList ( array  $arr_empl_user_ids)
Deprecated:
Please use getSuperiorsByUsers() from ilOrgUnitUserAssignmentDBRepository

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

87 : array
88 {
89 return $this->getAssignmentRepo()->getSuperiorsByUsers($arr_empl_user_ids);
90 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getInstance()

static OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getInstance ( )
static

Definition at line 32 of file class.ilOrgUnitUserAssignmentRepository.php.

32 : self
33 {
34 if (!isset(self::$instance)) {
35 self::$instance = new self();
36 }
37
38 return self::$instance;
39 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\$instance.

Referenced by ilPRGAssignmentDBRepository\interimOrguLookup().

+ Here is the caller graph for this function:

◆ getOrgUnitIdsOfUsersPosition()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getOrgUnitIdsOfUsersPosition ( int  $position_id,
int  $user_id,
bool  $recursive = false 
)
Deprecated:
Please use getOrgUnitsByUserAndPosition() from ilOrgUnitUserAssignmentDBRepository

Definition at line 167 of file class.ilOrgUnitUserAssignmentRepository.php.

171 : array {
172 return $this->getAssignmentRepo()->getOrgUnitsByUserAndPosition($user_id, $position_id, $recursive);
173 }

◆ getPositionRepo()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getPositionRepo ( )
private

Definition at line 41 of file class.ilOrgUnitUserAssignmentRepository.php.

42 {
43 if (!isset($this->positionRepo)) {
45 $this->positionRepo = $dic["repo.Positions"];
46 }
47
49 }

References $dic, OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\$positionRepo, and ilOrgUnitLocalDIC\dic().

+ Here is the call graph for this function:

◆ getPositionsOfUserId()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getPositionsOfUserId ( int  $user_id)
Deprecated:
Please use getPositionsByUser() from ilOrgUnitUserAssignmentDBRepository

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

95 : array
96 {
97 return $this->getAssignmentRepo()->getPositionsByUser($user_id);
98 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getUserAssignmentsOfPosition()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserAssignmentsOfPosition ( int  $position_id)
Deprecated:
Please use getByPosition() from ilOrgUnitUserAssignmentDBRepository

Definition at line 186 of file class.ilOrgUnitUserAssignmentRepository.php.

186 : array
187 {
188 return $this->getAssignmentRepo()->getByPosition($position_id);
189 }

◆ getUserIdsOfOrgUnit()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserIdsOfOrgUnit ( int  $orgunit_ref_id)
Deprecated:
Please use getUsersByOrgUnits() from ilOrgUnitUserAssignmentDBRepository

Definition at line 123 of file class.ilOrgUnitUserAssignmentRepository.php.

123 : array
124 {
125 return $this->getAssignmentRepo()->getUsersByOrgUnits([$orgunit_ref_id]);
126 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnits()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserIdsOfOrgUnits ( array  $orgunit_ref_id)
Deprecated:
Please use getUsersByOrgUnits() from ilOrgUnitUserAssignmentDBRepository

Definition at line 131 of file class.ilOrgUnitUserAssignmentRepository.php.

131 : array
132 {
133 return $this->getAssignmentRepo()->getUsersByOrgUnits($orgunit_ref_id);
134 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnitsInPosition()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserIdsOfOrgUnitsInPosition ( array  $orgu_ids,
int  $position_id 
)
Deprecated:
Please use getUsersByOrgUnitsAndPosition() from ilOrgUnitUserAssignmentDBRepository

Definition at line 147 of file class.ilOrgUnitUserAssignmentRepository.php.

147 : array
148 {
149 return $this->getAssignmentRepo()->getUsersByOrgUnitsAndPosition($orgu_ids, $position_id);
150 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getUserIdsOfOrgUnitsOfUsersPosition()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserIdsOfOrgUnitsOfUsersPosition ( int  $position_id,
int  $user_id,
bool  $recursive = false 
)
Deprecated:
Please use getUsersByUserAndPosition() from ilOrgUnitUserAssignmentDBRepository

Definition at line 139 of file class.ilOrgUnitUserAssignmentRepository.php.

139 : array
140 {
141 return $this->getAssignmentRepo()->getUsersByUserAndPosition($user_id, $position_id, $recursive);
142 }

References OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getAssignmentRepo().

+ Here is the call graph for this function:

◆ getUserIdsOfPosition()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserIdsOfPosition ( int  $position_id)
Deprecated:
Please use getUsersByPosition() from ilOrgUnitUserAssignmentDBRepository

Definition at line 178 of file class.ilOrgUnitUserAssignmentRepository.php.

178 : array
179 {
180 return $this->getAssignmentRepo()->getUsersByPosition($position_id);
181 }

◆ getUserIdsOfUsersOrgUnitsInPosition()

OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::getUserIdsOfUsersOrgUnitsInPosition ( int  $user_id,
array  $users_position_id,
int  $position_id,
bool  $recursive = false 
)
Deprecated:
Please use getFilteredUsersByUserAndPosition() from ilOrgUnitUserAssignmentDBRepository

Definition at line 155 of file class.ilOrgUnitUserAssignmentRepository.php.

160 : array {
161 return $this->getAssignmentRepo()->getFilteredUsersByUserAndPosition($user_id, array_shift($users_position_id), $position_id, $recursive);
162 }

Field Documentation

◆ $assignmentRepo

ilOrgUnitUserAssignmentDBRepository OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::$assignmentRepo
protected

◆ $instance

self OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::$instance
staticprotected

◆ $positionRepo

ilOrgUnitPositionDBRepository OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository::$positionRepo
protected

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