ILIAS
trunk Revision v11.0_alpha-1744-gb0451eebef4
◀ 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
Renderer.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\Implementation\Component\Legacy
;
22
23
use
ILIAS\UI\Implementation\Render\AbstractComponentRenderer
;
24
use
ILIAS\UI\Renderer
as
RendererInterface
;
25
use
ILIAS\UI\Component
;
26
31
class
Renderer
extends
AbstractComponentRenderer
32
{
36
public
function
render
(
Component
\
Component
$component,
RendererInterface
$default_renderer): string
37
{
38
if
(!$component instanceof
Component
\Legacy\
Content
) {
39
$this->
cannotHandleComponent
($component);
40
}
41
42
$component = $this->
registerSignals
($component);
43
$this->
bindJavaScript
($component);
44
return
$component->getContent();
45
}
46
47
protected
function
registerSignals
(
Content
$component):
Component
\
JavaScriptBindable
48
{
49
$custom_signals = $component->
getAllCustomSignals
();
50
51
return
$component->withAdditionalOnLoadCode(
function
(
$id
) use ($custom_signals):
string
{
52
$code =
""
;
53
foreach
($custom_signals as $custom_signal) {
54
$signal_id = $custom_signal[
'signal'
];
55
$signal_code = $custom_signal[
'js_code'
];
56
$code .=
"$(document).on('$signal_id', function(event, signalData) { $signal_code });"
;
57
}
58
return
$code;
59
});
60
}
61
}
ILIAS\UI\Implementation\Component\Legacy\Renderer\render
render(Component\Component $component, RendererInterface $default_renderer)
Definition:
Renderer.php:36
JavaScriptBindable
ILIAS\UI\Implementation\Component\Legacy\Content\getAllCustomSignals
getAllCustomSignals()
Get a list of all registered signals and their custom JavaScript code.
Definition:
Content.php:94
ILIAS\UI\Implementation\Component\Legacy\Renderer\registerSignals
registerSignals(Content $component)
Definition:
Renderer.php:47
ILIAS\UI\Component
Renderer
AbstractComponentRenderer
ILIAS\UI\Implementation\Component\Legacy\Content
Definition:
Content.php:34
ILIAS\UI\Implementation\Render\AbstractComponentRenderer\cannotHandleComponent
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
Definition:
AbstractComponentRenderer.php:249
$id
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition:
plugin.php:23
ILIAS\UI\Implementation\Component\Legacy
Definition:
Content.php:21
ILIAS\UI\Implementation\Render\AbstractComponentRenderer
Base class for all component renderers.
Definition:
AbstractComponentRenderer.php:43
ILIAS\UI\Implementation\Render\AbstractComponentRenderer\bindJavaScript
bindJavaScript(JavaScriptBindable $component)
Bind the component to JavaScript.
Definition:
AbstractComponentRenderer.php:154
components
ILIAS
UI
src
Implementation
Component
Legacy
Renderer.php
Generated on Tue Apr 8 2025 23:02:56 for ILIAS by
1.8.13 (using
Doxyfile
)