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.ilObjTermsOfService.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8
class
ilObjTermsOfService
extends
ilObject2
9
{
11
protected
$db
;
12
14
protected
$settings
;
15
20
public
function
__construct
($a_id = 0, $a_reference =
true
)
21
{
22
global
$DIC
;
23
24
parent::__construct
($a_id, $a_reference);
25
26
$this->db = $DIC[
'ilDB'
];
27
$this->
settings
= $DIC[
'ilSetting'
];
28
}
29
33
protected
function
initType
()
34
{
35
$this->type =
'tos'
;
36
}
37
41
public
function
resetAll
() : void
42
{
43
$in
= $this->db->in(
'usr_id'
, [ANONYMOUS_USER_ID, SYSTEM_USER_ID],
true
,
'integer'
);
44
$this->db->manipulate(
"UPDATE usr_data SET agree_date = NULL WHERE $in"
);
45
46
$this->
settings
->set(
'tos_last_reset'
, time());
47
}
48
53
public
function
getLastResetDate
() :
ilDateTime
54
{
55
return
new
ilDateTime
($this->
settings
->get(
'tos_last_reset'
),
IL_CAL_UNIX
);
56
}
57
61
public
function
saveStatus
(
bool
$status) : void
62
{
63
ilTermsOfServiceHelper::setStatus
((
bool
) $status);
64
}
65
69
public
function
getStatus
() : bool
70
{
71
return
ilTermsOfServiceHelper::isEnabled
();
72
}
73
}
settings
settings()
Definition:
settings.php:2
ilDateTime
ilObjTermsOfService\$settings
$settings
Definition:
class.ilObjTermsOfService.php:14
ilObjTermsOfService\__construct
__construct($a_id=0, $a_reference=true)
Definition:
class.ilObjTermsOfService.php:20
ilObjTermsOfService\resetAll
resetAll()
Definition:
class.ilObjTermsOfService.php:41
ilObjTermsOfService\getStatus
getStatus()
Definition:
class.ilObjTermsOfService.php:69
IL_CAL_UNIX
const IL_CAL_UNIX
Definition:
class.ilDateTime.php:11
ilObjTermsOfService\getLastResetDate
getLastResetDate()
Definition:
class.ilObjTermsOfService.php:53
ilTermsOfServiceHelper\setStatus
static setStatus(bool $status)
Definition:
class.ilTermsOfServiceHelper.php:52
ilObjTermsOfService\saveStatus
saveStatus(bool $status)
Definition:
class.ilObjTermsOfService.php:61
ilObject2
$in
if(php_sapi_name() !='cli') $in
Definition:
Utf8Test.php:37
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:30
$DIC
$DIC
Definition:
xapitoken.php:46
ilObjTermsOfService\initType
initType()
Definition:
class.ilObjTermsOfService.php:33
ilObjTermsOfService
Class ilObjTermsOfService.
Definition:
class.ilObjTermsOfService.php:8
ilObjTermsOfService\$db
$db
Definition:
class.ilObjTermsOfService.php:11
ilTermsOfServiceHelper\isEnabled
static isEnabled()
Definition:
class.ilTermsOfServiceHelper.php:42
Services
TermsOfService
classes
class.ilObjTermsOfService.php
Generated on Thu Apr 10 2025 20:01:28 for ILIAS by
1.8.13 (using
Doxyfile
)