ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
class.ilECSUserConsent.php
Go to the documentation of this file.
1
<?php
2
18
declare(strict_types=1);
19
24
class
ilECSUserConsent
25
{
26
private
int
$usr_id
;
27
private
int
$server_id
;
28
private
int
$mid
;
29
30
protected
ilDBInterface
$db
;
31
32
public
function
__construct
(
int
$a_usr_id,
int
$server_id,
int
$a_mid)
33
{
34
global
$DIC
;
35
36
$this->db = $DIC->database();
37
38
$this->usr_id = $a_usr_id;
39
$this->server_id =
$server_id
;
40
$this->mid = $a_mid;
41
}
42
43
public
function
getUserId
():
int
44
{
45
return
$this->usr_id
;
46
}
47
48
public
function
getMid
():
int
49
{
50
return
$this->mid
;
51
}
52
53
public
function
getServerId
():
int
54
{
55
return
$this->server_id
;
56
}
57
58
public
function
save
(): void
59
{
60
$this->db->replace(
61
'ecs_user_consent'
,
62
[
63
'usr_id'
=> [
ilDBConstants::T_INTEGER
, $this->
getUserId
()],
64
'server_id'
=> [
ilDBConstants::T_INTEGER
, $this->
getServerId
()],
65
'mid'
=> [
ilDBConstants::T_INTEGER
, $this->
getMid
()]
66
],
67
[]
68
);
69
}
70
71
public
function
delete
():
void
72
{
73
$query
=
'DELETE FROM ecs_user_consent '
.
74
'WHERE usr_id = '
. $this->db->quote(
75
$this->
getUserId
(),
76
ilDBConstants::T_INTEGER
77
) .
' '
.
78
'AND server_id = '
. $this->db->quote(
79
$this->
getServerId
(),
80
ilDBConstants::T_INTEGER
81
) .
' '
.
82
'AND mid = '
. $this->db->quote(
83
$this->
getMid
(),
84
ilDBConstants::T_INTEGER
85
);
86
$this->db->manipulate(
$query
);
87
}
88
}
ilECSUserConsent\$mid
int $mid
Definition:
class.ilECSUserConsent.php:28
ilECSUserConsent\$usr_id
int $usr_id
Definition:
class.ilECSUserConsent.php:26
$DIC
global $DIC
Definition:
feed.php:28
ilECSUserConsent\$db
ilDBInterface $db
Definition:
class.ilECSUserConsent.php:30
ilECSUserConsent\$server_id
int $server_id
Definition:
class.ilECSUserConsent.php:27
ilECSUserConsent\save
save()
Definition:
class.ilECSUserConsent.php:58
ilECSUserConsent\__construct
__construct(int $a_usr_id, int $server_id, int $a_mid)
Definition:
class.ilECSUserConsent.php:32
ilDBInterface
ilECSUserConsent\getServerId
getServerId()
Definition:
class.ilECSUserConsent.php:53
$query
$query
Definition:
proxy_ylocal.php:13
ilECSUserConsent\getMid
getMid()
Definition:
class.ilECSUserConsent.php:48
ilECSUserConsent\getUserId
getUserId()
Definition:
class.ilECSUserConsent.php:43
ilECSUserConsent
Class ilECSUserConsent.
Definition:
class.ilECSUserConsent.php:24
ilDBConstants\T_INTEGER
const T_INTEGER
Definition:
class.ilDBConstants.php:55
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
Services
WebServices
ECS
classes
Consent
class.ilECSUserConsent.php
Generated on Sun Aug 31 2025 22:02:40 for ILIAS by
1.8.13 (using
Doxyfile
)