ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilOrgUnitUserAssignment.php
Go to the documentation of this file.
1
<?php
2
3
use
ILIAS\DI\Container
;
4
11
class
ilOrgUnitUserAssignment
extends
\ActiveRecord
12
{
13
17
public
static
function
returnDbTableName
()
18
{
19
return
'il_orgu_ua'
;
20
}
21
22
33
protected
$id
= 0;
41
protected
$user_id
= 0;
49
protected
$position_id
= 0;
57
protected
$orgu_id
= 0;
58
59
67
public
static
function
findOrCreateAssignment
(
$user_id
,
$position_id
,
$orgu_id
)
68
{
69
$inst = self::where(array(
70
'user_id'
=>
$user_id
,
71
'position_id'
=>
$position_id
,
72
'orgu_id'
=>
$orgu_id
73
))->first();
74
if
(!$inst) {
75
$inst =
new
self
();
76
$inst->setPositionId(
$position_id
);
77
$inst->setUserId(
$user_id
);
78
$inst->setOrguId(
$orgu_id
);
79
$inst->create();
80
}
81
82
return
$inst;
83
}
84
85
protected
function
raiseEvent(
string
$event)
86
{
87
global
$DIC
;
91
if
(!$DIC->offsetExists(
'ilAppEventHandler'
)) {
92
return
;
93
}
94
$ilAppEventHandler = $DIC[
'ilAppEventHandler'
];
95
$ilAppEventHandler->raise(
'Modules/OrgUnit'
, $event, array(
96
'obj_id'
=> $this->
getOrguId
(),
97
'usr_id'
=> $this->
getUserId
(),
98
'position_id'
=> $this->
getPositionId
()
99
));
100
}
101
102
public
function
create
()
103
{
104
$this->raiseEvent(
'assignUserToPosition'
);
105
parent::create();
106
}
107
108
public
function
delete
()
109
{
110
$this->raiseEvent(
'deassignUserFromPosition'
);
111
parent::delete();
112
}
113
114
118
public
function
getId
()
119
{
120
return
$this->id
;
121
}
122
123
127
public
function
setId
(
$id
)
128
{
129
$this->
id
=
$id
;
130
}
131
132
136
public
function
getUserId
()
137
{
138
return
$this->user_id
;
139
}
140
141
145
public
function
setUserId
(
$user_id
)
146
{
147
$this->user_id =
$user_id
;
148
}
149
150
154
public
function
getPositionId
()
155
{
156
return
$this->position_id
;
157
}
158
159
163
public
function
setPositionId
(
$position_id
)
164
{
165
$this->position_id =
$position_id
;
166
}
167
168
172
public
function
getOrguId
()
173
{
174
return
$this->orgu_id
;
175
}
176
177
181
public
function
setOrguId
(
$orgu_id
)
182
{
183
$this->orgu_id =
$orgu_id
;
184
}
185
}
ilOrgUnitUserAssignment\$id
$id
Definition:
class.ilOrgUnitUserAssignment.php:33
ilOrgUnitUserAssignment\getId
getId()
Definition:
class.ilOrgUnitUserAssignment.php:118
ilOrgUnitUserAssignment\create
create()
Definition:
class.ilOrgUnitUserAssignment.php:102
ilOrgUnitUserAssignment\$position_id
$position_id
Definition:
class.ilOrgUnitUserAssignment.php:49
ActiveRecord
Class ActiveRecord.
Definition:
class.ActiveRecord.php:24
ilOrgUnitUserAssignment\findOrCreateAssignment
static findOrCreateAssignment($user_id, $position_id, $orgu_id)
Definition:
class.ilOrgUnitUserAssignment.php:67
ilOrgUnitUserAssignment\getPositionId
getPositionId()
Definition:
class.ilOrgUnitUserAssignment.php:154
ilOrgUnitUserAssignment\setId
setId($id)
Definition:
class.ilOrgUnitUserAssignment.php:127
ilOrgUnitUserAssignment\returnDbTableName
static returnDbTableName()
Definition:
class.ilOrgUnitUserAssignment.php:17
ilOrgUnitUserAssignment\setPositionId
setPositionId($position_id)
Definition:
class.ilOrgUnitUserAssignment.php:163
Container
ilOrgUnitUserAssignment\getUserId
getUserId()
Definition:
class.ilOrgUnitUserAssignment.php:136
ilOrgUnitUserAssignment\$orgu_id
$orgu_id
Definition:
class.ilOrgUnitUserAssignment.php:57
ilOrgUnitUserAssignment\$user_id
$user_id
Definition:
class.ilOrgUnitUserAssignment.php:41
$DIC
$DIC
Definition:
xapitoken.php:46
ilOrgUnitUserAssignment\setOrguId
setOrguId($orgu_id)
Definition:
class.ilOrgUnitUserAssignment.php:181
ilOrgUnitUserAssignment\setUserId
setUserId($user_id)
Definition:
class.ilOrgUnitUserAssignment.php:145
ilOrgUnitUserAssignment
ilOrgUnitUserAssignment\getOrguId
getOrguId()
Definition:
class.ilOrgUnitUserAssignment.php:172
Modules
OrgUnit
classes
Positions
UserAssignment
class.ilOrgUnitUserAssignment.php
Generated on Thu Apr 3 2025 20:00:52 for ILIAS by
1.8.13 (using
Doxyfile
)