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
BasicScreenContext.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\ScreenContext
;
22
23
use
ILIAS\Data\ReferenceId
;
24
use
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection
;
25
29
class
BasicScreenContext
implements
ScreenContext
30
{
31
protected
ReferenceId
$reference_id
;
32
protected
Collection
$additional_data
;
33
34
public
function
__construct
(
protected
string
$context_identifier)
35
{
36
$this->additional_data =
new
Collection
();
37
$this->reference_id =
new
ReferenceId
(-1);
38
}
39
40
public
function
hasReferenceId
(): bool
41
{
42
return
$this->reference_id->toInt() > 0;
43
}
44
45
public
function
getReferenceId
():
ReferenceId
46
{
47
return
$this->reference_id
;
48
}
49
50
public
function
withReferenceId
(
ReferenceId
$reference_id):
ScreenContext
51
{
52
if
($reference_id->
toInt
() < 1) {
53
throw
new \InvalidArgumentException(
'ReferenceId must be greater than 0'
);
54
}
55
56
$clone = clone $this;
57
$clone->reference_id =
$reference_id
;
58
59
return
$clone;
60
}
61
62
public
function
withAdditionalData
(
Collection
$collection):
ScreenContext
63
{
64
$clone = clone $this;
65
$clone->additional_data = $collection;
66
67
return
$clone;
68
}
69
70
public
function
getAdditionalData
():
Collection
71
{
72
return
$this->additional_data
;
73
}
74
75
public
function
addAdditionalData
(
string
$key, $value):
ScreenContext
76
{
77
$this->additional_data->add($key, $value);
78
79
return
$this;
80
}
81
82
public
function
getUniqueContextIdentifier
(): string
83
{
84
return
$this->context_identifier;
85
}
86
}
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\addAdditionalData
addAdditionalData(string $key, $value)
Definition:
BasicScreenContext.php:75
ILIAS\Data\ReferenceId
Definition:
ReferenceId.php:32
ILIAS\Data\ReferenceId\toInt
toInt()
Definition:
ReferenceId.php:41
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\$reference_id
ReferenceId $reference_id
Definition:
BasicScreenContext.php:31
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\withAdditionalData
withAdditionalData(Collection $collection)
Definition:
BasicScreenContext.php:62
ILIAS\GlobalScreen\ScreenContext\AdditionalData\Collection
Class Collection.
Definition:
Collection.php:28
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\getUniqueContextIdentifier
getUniqueContextIdentifier()
Definition:
BasicScreenContext.php:82
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\getAdditionalData
getAdditionalData()
Definition:
BasicScreenContext.php:70
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\__construct
__construct(protected string $context_identifier)
Definition:
BasicScreenContext.php:34
ILIAS\GlobalScreen\ScreenContext
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext
Definition:
BasicScreenContext.php:29
Collection
ReferenceId
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\getReferenceId
getReferenceId()
Definition:
BasicScreenContext.php:45
ILIAS\GlobalScreen\ScreenContext\ScreenContext
Interface ScreenContext.
Definition:
ScreenContext.php:29
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\withReferenceId
withReferenceId(ReferenceId $reference_id)
Definition:
BasicScreenContext.php:50
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\hasReferenceId
hasReferenceId()
Definition:
BasicScreenContext.php:40
ILIAS\GlobalScreen\ScreenContext\BasicScreenContext\$additional_data
Collection $additional_data
Definition:
BasicScreenContext.php:32
components
ILIAS
GlobalScreen
src
ScreenContext
BasicScreenContext.php
Generated on Wed Apr 2 2025 23:02:56 for ILIAS by
1.8.13 (using
Doxyfile
)