ILIAS
trunk Revision v11.0_alpha-1689-g66c127b4ae8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
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
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
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
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
UserLanguage.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\LegalDocuments\Condition
;
22
23
use
ILIAS\LegalDocuments\Condition
;
24
use
ILIAS\LegalDocuments\ConditionDefinition
;
25
use
ILIAS\LegalDocuments\Condition\Definition\UserLanguageDefinition
;
26
use
ILIAS\LegalDocuments\Value\CriterionContent
;
27
use
ILIAS\UI\Component\Component
;
28
use
ILIAS\UI\Factory
as
UIFactory
;
29
use
ilObjUser
;
30
31
class
UserLanguage
implements
Condition
32
{
33
public
function
__construct
(
34
private
readonly
CriterionContent
$criterion,
35
private
readonly
UserLanguageDefinition
$definition,
36
private
readonly
UIFactory
$create
37
) {
38
}
39
40
public
function
asComponent
():
Component
41
{
42
return
$this->create->legacy()->content(sprintf(
43
'<div><b>%s</b><br/>%s</div>'
,
44
$this->
definition
->translatedType(),
45
$this->
definition
->translatedLanguage($this->criterion->arguments()[
'lng'
])
46
));
47
}
48
49
public
function
eval
(
ilObjUser
$user): bool
50
{
51
return
strtoupper($user->
getLanguage
()) === strtoupper($this->criterion->arguments()[
'lng'
]);
52
}
53
54
public
function
definition
():
ConditionDefinition
55
{
56
return
$this->definition;
57
}
58
59
public
function
knownToNeverMatchWith
(
Condition
$other): bool
60
{
61
return
$other instanceof (self::class);
62
}
63
}
UserLanguageDefinition
ConditionDefinition
Factory
ILIAS\LegalDocuments\ConditionDefinition
Definition:
ConditionDefinition.php:26
ILIAS\UI\Component
Component
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
CriterionContent
ILIAS\LegalDocuments\Condition\UserLanguage\knownToNeverMatchWith
knownToNeverMatchWith(Condition $other)
Definition:
UserLanguage.php:59
ILIAS\LegalDocuments\Condition\UserLanguage\__construct
__construct(private readonly CriterionContent $criterion, private readonly UserLanguageDefinition $definition, private readonly UIFactory $create)
Definition:
UserLanguage.php:33
ilObjUser
ILIAS\LegalDocuments\Condition\UserLanguage\asComponent
asComponent()
Definition:
UserLanguage.php:40
ILIAS\LegalDocuments\Condition\UserLanguage
Definition:
UserLanguage.php:31
ILIAS\LegalDocuments\Condition\UserLanguage\eval
eval(ilObjUser $user)
Definition:
UserLanguage.php:49
ILIAS\LegalDocuments\Condition
Definition:
Condition.php:26
ILIAS\LegalDocuments\Value\CriterionContent
Definition:
CriterionContent.php:23
ILIAS\LegalDocuments\Condition
ILIAS\LegalDocuments\Condition\Definition\UserLanguageDefinition
Definition:
UserLanguageDefinition.php:33
ilObjUser\getLanguage
getLanguage()
Definition:
class.ilObjUser.php:1521
ILIAS\LegalDocuments\Condition\UserLanguage\definition
definition()
Definition:
UserLanguage.php:54
components
ILIAS
LegalDocuments
classes
Condition
UserLanguage.php
Generated on Wed Apr 2 2025 23:03:06 for ILIAS by
1.8.13 (using
Doxyfile
)