ILIAS
release_8 Revision v8.19
◀ 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
n
o
p
r
s
t
u
v
w
x
+
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
j
l
m
p
s
t
u
+
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
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilTermsOfServiceTableDataProviderFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
25
class
ilTermsOfServiceTableDataProviderFactory
26
{
27
public
const
CONTEXT_ACCEPTANCE_HISTORY
=
'acceptance_history'
;
28
public
const
CONTEXT_DOCUMENTS
=
'documents'
;
29
30
protected
?
ilDBInterface
$db
= null;
31
38
public
function
getByContext
(
string
$context
):
ilTermsOfServiceTableDataProvider
39
{
40
switch
($context) {
41
case
self::CONTEXT_ACCEPTANCE_HISTORY:
42
$this->
validateConfiguration
([
'db'
]);
43
return
new
ilTermsOfServiceAcceptanceHistoryProvider
($this->
getDatabaseAdapter
());
44
45
case
self::CONTEXT_DOCUMENTS:
46
return
new
ilTermsOfServiceDocumentTableDataProvider
();
47
48
default
:
49
throw
new
InvalidArgumentException
(
'Provider not supported'
);
50
}
51
}
52
57
protected
function
validateConfiguration
(array $mandatoryMemberVariables): void
58
{
59
foreach
($mandatoryMemberVariables as $member) {
60
if
(null === $this->{$member}) {
61
$exception = $this->
getExceptionByMember
($member);
62
throw
$exception;
63
}
64
}
65
}
66
72
protected
function
getExceptionByMember
(
string
$member):
ilTermsOfServiceException
73
{
74
switch
($member) {
75
case
'db'
:
76
return
new
ilTermsOfServiceMissingDatabaseAdapterException
(
77
'Incomplete factory configuration. Please inject a database adapter.'
78
);
79
80
default
:
81
throw
new
InvalidArgumentException
(
"Exception for member $member not supported"
);
82
}
83
}
84
85
public
function
setDatabaseAdapter
(?
ilDBInterface
$db): void
86
{
87
$this->db =
$db
;
88
}
89
90
public
function
getDatabaseAdapter
(): ?
ilDBInterface
91
{
92
return
$this->db
;
93
}
94
}
ilTermsOfServiceTableDataProviderFactory\CONTEXT_ACCEPTANCE_HISTORY
const CONTEXT_ACCEPTANCE_HISTORY
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:27
ilTermsOfServiceAcceptanceHistoryProvider
Class ilTermsOfServiceAcceptanceHistoryProvider.
Definition:
class.ilTermsOfServiceAcceptanceHistoryProvider.php:25
$context
$context
Definition:
webdav.php:29
ilTermsOfServiceTableDataProviderFactory\setDatabaseAdapter
setDatabaseAdapter(?ilDBInterface $db)
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:85
ilTermsOfServiceDocumentTableDataProvider
Class ilTermsOfServiceDocumentTableDataProvider.
Definition:
class.ilTermsOfServiceDocumentTableDataProvider.php:25
ilTermsOfServiceTableDataProviderFactory\$db
ilDBInterface $db
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:30
ilTermsOfServiceTableDataProviderFactory\getByContext
getByContext(string $context)
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:38
ilTermsOfServiceTableDataProviderFactory\getDatabaseAdapter
getDatabaseAdapter()
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:90
ilTermsOfServiceTableDataProvider
Interface ilTermsOfServiceTableDataProvider.
Definition:
interface.ilTermsOfServiceTableDataProvider.php:25
ilTermsOfServiceException
Class ilTermsOfServiceMissingDatabaseAdapterException.
Definition:
class.ilTermsOfServiceException.php:25
ilTermsOfServiceTableDataProviderFactory\getExceptionByMember
getExceptionByMember(string $member)
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:72
ilTermsOfServiceTableDataProviderFactory
Class ilTermsOfServiceTableDataProviderFactory.
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:25
ilDBInterface
ilTermsOfServiceTableDataProviderFactory\validateConfiguration
validateConfiguration(array $mandatoryMemberVariables)
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:57
ilTermsOfServiceMissingDatabaseAdapterException
Class ilTermsOfServiceMissingDatabaseAdapterException.
Definition:
class.ilTermsOfServiceMissingDatabaseAdapterException.php:25
InvalidArgumentException
ilTermsOfServiceTableDataProviderFactory\CONTEXT_DOCUMENTS
const CONTEXT_DOCUMENTS
Definition:
class.ilTermsOfServiceTableDataProviderFactory.php:28
Services
TermsOfService
classes
class.ilTermsOfServiceTableDataProviderFactory.php
Generated on Tue Apr 1 2025 22:02:36 for ILIAS by
1.8.13 (using
Doxyfile
)