ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
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
}
php
An exception for terminatinating execution or to throw for unit testing.
ExamplePlugin
Definition:
ExamplePlugin.php:6
ExamplePlugin\exchangeUIRendererAfterInitialization
exchangeUIRendererAfterInitialization(Container $dic)
Definition:
ExamplePlugin.php:7
ExamplePlugin\getPluginName
getPluginName()
Get Plugin Name.
Definition:
ExamplePlugin.php:24
ExampleRenderer
Definition:
ExampleRenderer.php:10
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:18
ilPlugin\isActive
isActive()
Check whether plugin is active.
Definition:
class.ilPlugin.php:840
ilUserInterfaceHookPlugin
Class ilUserInterfaceHookPlugin.
Definition:
class.ilUserInterfaceHookPlugin.php:12
$dic
$dic
Definition:
result.php:13
docs
development
code-examples
ui-exchange
00_base_classes
ExamplePlugin.php
Generated on Sat Oct 4 2025 20:00:43 for ILIAS by
1.9.4 (using
Doxyfile
)