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
ContextRepository.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
20
namespace
ILIAS\GlobalScreen\ScreenContext
;
21
22
use
ILIAS\Data\ReferenceId
;
23
use
ILIAS\HTTP\Wrapper\WrapperFactory
;
24
use
ILIAS\Refinery\Factory
;
25
use
ILIAS\GlobalScreen\Identification\IdentificationInterface
;
26
34
class
ContextRepository
35
{
36
private
array
$contexts
= [];
37
private
const
C_MAIN
=
'main'
;
38
private
const
C_DESKTOP
=
'desktop'
;
39
private
const
C_REPO
=
'repo'
;
40
private
const
C_ADMINISTRATION
=
'administration'
;
41
private
const
C_LTI
=
'lti'
;
42
43
protected
WrapperFactory
$wrapper
;
44
protected
Factory
$refinery
;
45
46
public
function
__construct
()
47
{
48
global
$DIC
;
49
$this->wrapper = $DIC->http()->wrapper();
50
$this->
refinery
= $DIC->refinery();
51
}
52
56
public
function
main
():
ScreenContext
57
{
58
return
$this->
get
(BasicScreenContext::class, self::C_MAIN);
59
}
60
64
public
function
internal
():
ScreenContext
65
{
66
return
$this->
get
(BasicScreenContext::class,
'internal'
);
67
}
68
72
public
function
external
():
ScreenContext
73
{
74
return
$this->
get
(BasicScreenContext::class,
'external'
);
75
}
76
80
public
function
desktop
():
ScreenContext
81
{
82
return
$this->
get
(BasicScreenContext::class, self::C_DESKTOP);
83
}
84
88
public
function
repository
():
ScreenContext
89
{
90
$context
= $this->
get
(BasicScreenContext::class, self::C_REPO);
91
$ref_id
= $this->wrapper->query()->has(
'ref_id'
)
92
? $this->wrapper->query()->retrieve(
'ref_id'
, $this->
refinery
->kindlyTo()->int())
93
: 0;
94
$context
=
$context
->withReferenceId(
new
ReferenceId
(
$ref_id
));
95
96
return
$context
;
97
}
98
102
public
function
administration
():
ScreenContext
103
{
104
return
$this->
get
(BasicScreenContext::class, self::C_ADMINISTRATION);
105
}
106
110
public
function
lti
():
ScreenContext
111
{
112
return
$this->
get
(BasicScreenContext::class, self::C_LTI);
113
}
114
115
private
function
get
(
string
$class_name,
string
$identifier):
ScreenContext
116
{
117
if
(!isset($this->contexts[$identifier])) {
118
$this->contexts[$identifier] =
new
$class_name($identifier);
119
}
120
121
return
$this->contexts[$identifier];
122
}
123
}
$context
$context
Definition:
webdav.php:29
ILIAS\GlobalScreen\ScreenContext\ContextRepository\external
function external()
Definition:
ContextRepository.php:72
ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_DESKTOP
const C_DESKTOP
Definition:
ContextRepository.php:38
ILIAS\Data\ReferenceId
Definition:
ReferenceId.php:16
ILIAS\GlobalScreen\ScreenContext\ContextRepository\administration
administration()
Definition:
ContextRepository.php:102
ILIAS\GlobalScreen\ScreenContext\ContextRepository\$refinery
Factory $refinery
Definition:
ContextRepository.php:44
ILIAS\HTTP\Wrapper\WrapperFactory
Class WrapperFactory.
Definition:
WrapperFactory.php:26
ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_REPO
const C_REPO
Definition:
ContextRepository.php:39
ILIAS\GlobalScreen\ScreenContext\ContextRepository\__construct
__construct()
Definition:
ContextRepository.php:46
ILIAS\GlobalScreen\ScreenContext\ContextRepository\lti
lti()
Definition:
ContextRepository.php:110
ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_MAIN
const C_MAIN
Definition:
ContextRepository.php:37
ILIAS\GlobalScreen\ScreenContext\ContextRepository\main
main()
Definition:
ContextRepository.php:56
ILIAS\GlobalScreen\ScreenContext\ContextRepository
Class ContextRepository The Collection of all available Contexts in the System.
Definition:
ContextRepository.php:34
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\Repository\refinery
refinery()
Definition:
trait.GlobalDICDomainServices.php:71
$ref_id
$ref_id
Definition:
ltiauth.php:67
IdentificationInterface
ILIAS\GlobalScreen\ScreenContext
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Factory
ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_ADMINISTRATION
const C_ADMINISTRATION
Definition:
ContextRepository.php:40
ILIAS\GlobalScreen\ScreenContext\ContextRepository\C_LTI
const C_LTI
Definition:
ContextRepository.php:41
ReferenceId
ILIAS\GlobalScreen\ScreenContext\ContextRepository\$wrapper
WrapperFactory $wrapper
Definition:
ContextRepository.php:43
WrapperFactory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS\GlobalScreen\ScreenContext\ContextRepository\$contexts
array $contexts
Definition:
ContextRepository.php:36
ILIAS\GlobalScreen\ScreenContext\ContextRepository\repository
repository()
Definition:
ContextRepository.php:88
ILIAS\GlobalScreen\ScreenContext\ContextRepository\desktop
desktop()
Definition:
ContextRepository.php:80
ILIAS\GlobalScreen\ScreenContext\ScreenContext
Interface ScreenContext.
Definition:
ScreenContext.php:29
src
GlobalScreen
ScreenContext
ContextRepository.php
Generated on Tue Apr 1 2025 22:02:45 for ILIAS by
1.8.13 (using
Doxyfile
)