ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ExamplePlugin.php
Go to the documentation of this file.
1 <?php
2 
4 
6 {
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 }
exchangeUIRendererAfterInitialization(Container $dic)
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:17
isActive()
Check whether plugin is active.
Class ilUserInterfaceHookPlugin.
$dic
Definition: result.php:13