ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ExampleRenderer Class Reference
+ Inheritance diagram for ExampleRenderer:
+ Collaboration diagram for ExampleRenderer:

Protected Member Functions

 manipulateRendering ($component, Renderer $root)
 
- Protected Member Functions inherited from ILIAS\UI\Implementation\Render\DecoratedRenderer
 manipulateRendering ($component, Renderer $root)
 Manipulates the rendering of one or multiple components by appending, prepending or exchanging their rendered content with custom adjustments. More...
 
 manipulateAsyncRendering ($component, Renderer $root)
 Manipulates the async Rendering separately if needed. More...
 
 renderDefault ($component, ?Renderer $root=null)
 Renders the component by default. More...
 

Additional Inherited Members

- Public Member Functions inherited from ILIAS\UI\Implementation\Render\DecoratedRenderer
 __construct (Renderer $default)
 
 withAdditionalContext (Component $context)
 Get a new renderer with an additional context.A context makes it possible to use another renderer for (some) components when they are renderer as subcomponents of a certain components. The use case that spawned this functionality is the observation, that e.g. items representing repository objects are renderer in different lists, where the individual items look different every time but are morally the same item. Another use case could be a special rendering of input fields in filters over tables.If a component wants to render itself differently in different contexts, it must implement a RendererFactory. The class contains directions how to do that.
Parameters
Component$context
Returns
Renderer
More...
 
 render ($component, ?Renderer $root=null)
 Render given component.If an array of components is passed, this method returns a concatenated output of each rendered component, in the same order as given in the array
Parameters
Component|Component[]$component
?Renderer$root of renderers in the chain to be used for rendering sub components.
Returns
string
More...
 
 renderAsync ($component, ?Renderer $root=null)
 Same as render, except that this version also returns any javascript code bound to the on load event, wrapped in a script tag.All javascript code stored for rendering will be removed after this output so it will not be rendered twice if render async is called multiple times.
Parameters
Component|Component[]$component
?Renderer$root of renderers in the chain to be used for rendering sub components.
Returns
string
More...
 

Detailed Description

Definition at line 9 of file ExampleRenderer.php.

Member Function Documentation

◆ manipulateRendering()

ExampleRenderer::manipulateRendering (   $component,
Renderer  $root 
)
protected

Definition at line 12 of file ExampleRenderer.php.

References ILIAS\UI\Implementation\Render\DecoratedRenderer\renderDefault().

12  : ?string
13  {
14  //select the component you want to manipulate
15  if ($component instanceof Bulky) {
16  //if you need the origin rendering (e.g. for append or prepend) you can access it by calling renderDefault()
17  return "A" . $this->renderDefault($component, $root);
18  }
19 
20  //skip components that are not important to you with returning null
21  return null;
22  }
renderDefault($component, ?Renderer $root=null)
Renders the component by default.
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: