ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ 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
PromptContextRenderer.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\Implementation\Component\MessageBox
;
22
23
use
ILIAS\UI\Implementation\Render\AbstractComponentRenderer
;
24
use
ILIAS\UI\Renderer
as
RendererInterface
;
25
use
ILIAS\UI\Component
;
26
31
class
PromptContextRenderer
extends
AbstractComponentRenderer
32
{
36
public
function
render
(
Component
\
Component
$component,
RendererInterface
$default_renderer): string
37
{
38
$ui_fac = $this->
getUIFactory
();
39
40
if
(!$component instanceof
Component
\
MessageBox
\
MessageBox
) {
41
$this->
cannotHandleComponent
($component);
42
}
43
44
$tpl = $this->
getTemplate
(
"tpl.messagebox.html"
,
true
,
true
);
45
$tpl->setCurrentBlock(
"message_box"
);
46
47
$tpl->setVariable(
"MESSAGE_TEXT"
, $component->getMessageText());
48
$tpl->setVariable(
"ACC_TEXT"
, $this->
txt
($component->getType() .
"_message"
));
49
if
($component->getType() ==
Component\MessageBox\MessageBox::FAILURE
) {
50
$tpl->setVariable(
"ROLE"
,
"alert"
);
51
}
else
{
52
$tpl->setVariable(
"ROLE"
,
"status"
);
53
}
54
55
56
$links = $component->getLinks();
57
if
(count($links) > 0) {
58
$unordered = $ui_fac->listing()->unordered(
59
$links
60
);
61
62
$tpl->setVariable(
"LINK_LIST"
, $default_renderer->render($unordered));
63
}
64
65
$tpl->touchBlock($component->getType() .
"_class"
);
66
67
$tpl->parseCurrentBlock();
68
69
return
$tpl->get();
70
}
71
}
ILIAS\UI\Component\MessageBox\MessageBox\FAILURE
const FAILURE
Definition:
MessageBox.php:32
ILIAS\UI\Component
Renderer
ILIAS\UI\Implementation\Render\AbstractComponentRenderer\txt
txt(string $id)
Get a text from the language file.
Definition:
AbstractComponentRenderer.php:90
AbstractComponentRenderer
ILIAS\UI\Implementation\Component\MessageBox\PromptContextRenderer\render
render(Component\Component $component, RendererInterface $default_renderer)
Definition:
PromptContextRenderer.php:36
ILIAS\UI\Implementation\Component\MessageBox\PromptContextRenderer
Definition:
PromptContextRenderer.php:31
ILIAS\UI\Implementation\Render\AbstractComponentRenderer\getTemplate
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
Definition:
AbstractComponentRenderer.php:125
ILIAS\UI\Implementation\Component\MessageBox
Definition:
Factory.php:21
ILIAS\UI\Implementation\Component\MessageBox\MessageBox
Definition:
MessageBox.php:27
ILIAS\UI\Implementation\Render\AbstractComponentRenderer\cannotHandleComponent
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
Definition:
AbstractComponentRenderer.php:249
ILIAS\UI\Implementation\Render\AbstractComponentRenderer\getUIFactory
getUIFactory()
Get a UI factory.
Definition:
AbstractComponentRenderer.php:72
ILIAS\UI\Implementation\Render\AbstractComponentRenderer
Base class for all component renderers.
Definition:
AbstractComponentRenderer.php:43
components
ILIAS
UI
src
Implementation
Component
MessageBox
PromptContextRenderer.php
Generated on Sun Apr 13 2025 23:04:13 for ILIAS by
1.8.13 (using
Doxyfile
)