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
ContextCollection.php
Go to the documentation of this file.
1
<?php
namespace
ILIAS\GlobalScreen\ScreenContext\Stack
;
2
3
use
ILIAS\GlobalScreen\ScreenContext\ContextRepository
;
4
use
ILIAS\GlobalScreen\ScreenContext\ScreenContext
;
5
11
class
ContextCollection
12
{
13
const
C_MAIN
=
'main'
;
14
const
C_DESKTOP
=
'desktop'
;
15
const
C_REPO
=
'repo'
;
16
const
C_ADMINISTRATION
=
'administration'
;
17
const
C_MAIL
=
'mail'
;
21
protected
$repo
;
25
protected
$stack
= [];
26
27
33
public
function
__construct
(
ContextRepository
$context_repository)
34
{
35
$this->repo = $context_repository;
36
}
37
38
42
public
function
push
(
ScreenContext
$context
)
43
{
44
array_push($this->stack, $context);
45
}
46
47
51
public
function
getLast
() :
ScreenContext
52
{
53
return
end($this->stack);
54
}
55
56
60
public
function
getStack
() : array
61
{
62
return
$this->stack
;
63
}
64
65
69
public
function
getStackAsArray
() : array
70
{
71
$return = [];
72
foreach
($this->stack as $item) {
73
$return[] = $item->getUniqueContextIdentifier();
74
}
75
76
return
$return;
77
}
78
79
85
public
function
hasMatch
(
ContextCollection
$other_collection) : bool
86
{
87
$mapper =
function
(
ScreenContext
$c
) {
88
return
$c
->getUniqueContextIdentifier();
89
};
90
$mine = array_map($mapper, $this->
getStack
());
91
$theirs = array_map($mapper, $other_collection->
getStack
());
92
93
return
(count(array_intersect($mine, $theirs)) > 0);
94
}
95
96
//
97
//
98
//
102
public
function
main
() :
ContextCollection
103
{
104
$context
= $this->repo->main();
105
$this->
push
(
$context
);
106
107
return
$this
;
108
}
109
110
114
public
function
desktop
() :
ContextCollection
115
{
116
$this->
push
($this->repo->desktop());
117
118
return
$this
;
119
}
120
121
125
public
function
repository
() :
ContextCollection
126
{
127
$this->
push
($this->repo->repository());
128
129
return
$this
;
130
}
131
132
136
public
function
administration
() :
ContextCollection
137
{
138
$this->
push
($this->repo->administration());
139
140
return
$this
;
141
}
142
143
147
public
function
internal
() :
ContextCollection
148
{
149
$this->
push
($this->repo->internal());
150
151
return
$this
;
152
}
153
154
158
public
function
external
() :
ContextCollection
159
{
160
$this->
push
($this->repo->external());
161
162
return
$this
;
163
}
164
165
169
public
function
lti
() :
ContextCollection
170
{
171
$this->
push
($this->repo->lti());
172
return
$this
;
173
}
174
}
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\lti
lti()
Definition:
ContextCollection.php:169
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$this
function return $this
Definition:
ContextCollection.php:149
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\C_REPO
const C_REPO
Definition:
ContextCollection.php:15
$context
$context
Definition:
webdav.php:26
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\administration
administration()
Definition:
ContextCollection.php:136
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\getStack
getStack()
Definition:
ContextCollection.php:60
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\C_DESKTOP
const C_DESKTOP
Definition:
ContextCollection.php:14
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\desktop
desktop()
Definition:
ContextCollection.php:114
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main
main()
Definition:
ContextCollection.php:102
ScreenContext
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\external
external()
Definition:
ContextCollection.php:158
ILIAS\GlobalScreen\ScreenContext\ContextRepository
Class ContextRepository.
Definition:
ContextRepository.php:13
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$stack
$stack
Definition:
ContextCollection.php:25
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\push
push(ScreenContext $context)
Definition:
ContextCollection.php:42
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\$repo
$repo
Definition:
ContextCollection.php:21
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\C_ADMINISTRATION
const C_ADMINISTRATION
Definition:
ContextCollection.php:16
ILIAS\GlobalScreen\ScreenContext\Stack
Definition:
CalledContexts.php:1
ContextRepository
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\repository
repository()
Definition:
ContextCollection.php:125
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\getLast
getLast()
Definition:
ContextCollection.php:51
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\getStackAsArray
getStackAsArray()
Definition:
ContextCollection.php:69
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\hasMatch
hasMatch(ContextCollection $other_collection)
Definition:
ContextCollection.php:85
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection
Definition:
ContextCollection.php:11
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\C_MAIL
const C_MAIL
Definition:
ContextCollection.php:17
Vendor\Package\$c
$c
Definition:
example_cleaned.php:31
ILIAS\GlobalScreen\ScreenContext\ScreenContext
Interface ScreenContext.
Definition:
ScreenContext.php:11
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\C_MAIN
const C_MAIN
Definition:
ContextCollection.php:13
ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\__construct
__construct(ContextRepository $context_repository)
ContextCollection constructor.
Definition:
ContextCollection.php:33
src
GlobalScreen
ScreenContext
Stack
ContextCollection.php
Generated on Mon Apr 7 2025 20:01:34 for ILIAS by
1.8.13 (using
Doxyfile
)