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
ExamplePlugin.php
Go to the documentation of this file.
1
<?php
2
3
use
ILIAS\DI\Container
;
4
5
class
ExamplePlugin
extends
ilUserInterfaceHookPlugin
6
{
7
public
function
exchangeUIRendererAfterInitialization
(
Container
$dic
):
Closure
8
{
9
//Safe the origin renderer closure
10
$renderer = $dic->raw(
'ui.renderer'
);
11
12
//return origin if plugin is not active
13
if
(!$this->
isActive
()) {
14
return
$renderer;
15
}
16
17
//else return own renderer with origin as default
18
//be aware that you can not provide the renderer itself for the closure since its state changes
19
return
function
() use ($dic, $renderer) {
20
return
new
ExampleRenderer
($renderer($dic));
21
};
22
}
23
24
public
function
getPluginName
()
25
{
26
return
"NoRealPlugin"
;
27
}
28
}
ExamplePlugin\exchangeUIRendererAfterInitialization
exchangeUIRendererAfterInitialization(Container $dic)
Definition:
ExamplePlugin.php:7
Closure
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:17
ExampleRenderer
Definition:
ExampleRenderer.php:9
ilPlugin\isActive
isActive()
Check whether plugin is active.
Definition:
class.ilPlugin.php:840
Container
ExamplePlugin\getPluginName
getPluginName()
Definition:
ExamplePlugin.php:24
ilUserInterfaceHookPlugin
Class ilUserInterfaceHookPlugin.
Definition:
class.ilUserInterfaceHookPlugin.php:11
$dic
$dic
Definition:
result.php:13
ExamplePlugin
Definition:
ExamplePlugin.php:5
docs
development
code-examples
ui-exchange
00_base_classes
ExamplePlugin.php
Generated on Thu Apr 10 2025 20:00:56 for ILIAS by
1.8.13 (using
Doxyfile
)