ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\Component\Test\Renderer Class Reference
+ Inheritance diagram for ILIAS\UI\Component\Test\Renderer:
+ Collaboration diagram for ILIAS\UI\Component\Test\Renderer:

Public Member Functions

 __construct (Factory $ui_factory, TemplateFactory $tpl_factory, \ILIAS\Language\Language $lng, JavaScriptBinding $js_binding)
 
 render (Component $component, DefaultRenderer $default_renderer)
 
 registerResources (ResourceRegistry $registry)
 Announce resources this renderer requires. More...
 
- Public Member Functions inherited from ILIAS\UI\Implementation\Render\ComponentRenderer
 render (Component $component, Renderer $default_renderer)
 Render the component if possible and delegate additional rendering to the default_renderer. More...
 
 registerResources (ResourceRegistry $registry)
 Announce resources this renderer requires. More...
 

Data Fields

Factory $ui_factory
 
TemplateFactory $tpl_factory
 
ILIAS Language Language $lng
 
JavaScriptBinding $js_binding
 

Private Member Functions

 bindOnloadCode (\ILIAS\UI\Component\JavaScriptBindable $component)
 

Detailed Description

Definition at line 58 of file TestComponent.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Component\Test\Renderer::__construct ( Factory  $ui_factory,
TemplateFactory  $tpl_factory,
\ILIAS\Language\Language  $lng,
JavaScriptBinding  $js_binding 
)
final

Definition at line 65 of file TestComponent.php.

66 {
67 $this->ui_factory = $ui_factory;
68 $this->tpl_factory = $tpl_factory;
69 $this->lng = $lng;
70 $this->js_binding = $js_binding;
71 }
ILIAS Language Language $lng

References ILIAS\UI\Component\Test\Renderer\$js_binding, ILIAS\UI\Component\Test\Renderer\$lng, ILIAS\UI\Component\Test\Renderer\$tpl_factory, ILIAS\UI\Component\Test\Renderer\$ui_factory, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ bindOnloadCode()

ILIAS\UI\Component\Test\Renderer::bindOnloadCode ( \ILIAS\UI\Component\JavaScriptBindable  $component)
private

Definition at line 90 of file TestComponent.php.

90 : void
91 {
92 $binder = $component->getOnLoadCode();
93 $this->js_binding->addOnLoadCode($binder("id"));
94 }

Referenced by ILIAS\UI\Component\Test\Renderer\render().

+ Here is the caller graph for this function:

◆ registerResources()

ILIAS\UI\Component\Test\Renderer::registerResources ( ResourceRegistry  $registry)

Announce resources this renderer requires.

Implements ILIAS\UI\Implementation\Render\ComponentRenderer.

Definition at line 85 of file TestComponent.php.

85 : void
86 {
87 $registry->register("test.js");
88 }

References ILIAS\UI\Implementation\Render\ResourceRegistry\register().

+ Here is the call graph for this function:

◆ render()

ILIAS\UI\Component\Test\Renderer::render ( Component  $component,
DefaultRenderer  $default_renderer 
)

Definition at line 73 of file TestComponent.php.

73 : string
74 {
75 if ($component instanceof JSTestComponent) {
76 $text = $component->text;
77 $component = $component->withAdditionalOnLoadCode(function ($id) use ($text) {
78 return "id:$text.$id content:$text";
79 });
80 $this->bindOnloadCode($component);
81 }
82 return $component->text;
83 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
bindOnloadCode(\ILIAS\UI\Component\JavaScriptBindable $component)

References $id, and ILIAS\UI\Component\Test\Renderer\bindOnloadCode().

+ Here is the call graph for this function:

Field Documentation

◆ $js_binding

JavaScriptBinding ILIAS\UI\Component\Test\Renderer::$js_binding

Definition at line 63 of file TestComponent.php.

Referenced by ILIAS\UI\Component\Test\Renderer\__construct().

◆ $lng

ILIAS Language Language ILIAS\UI\Component\Test\Renderer::$lng

Definition at line 62 of file TestComponent.php.

Referenced by ILIAS\UI\Component\Test\Renderer\__construct().

◆ $tpl_factory

TemplateFactory ILIAS\UI\Component\Test\Renderer::$tpl_factory

Definition at line 61 of file TestComponent.php.

Referenced by ILIAS\UI\Component\Test\Renderer\__construct().

◆ $ui_factory

Factory ILIAS\UI\Component\Test\Renderer::$ui_factory

Definition at line 60 of file TestComponent.php.

Referenced by ILIAS\UI\Component\Test\Renderer\__construct().


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