ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ILIAS\UI\Implementation\Component\Counter\Renderer Class Reference
+ Inheritance diagram for ILIAS\UI\Implementation\Component\Counter\Renderer:
+ Collaboration diagram for ILIAS\UI\Implementation\Component\Counter\Renderer:

Public Member Functions

 render (Component\Component $component, RendererInterface $default_renderer)
 
 registerResources (ResourceRegistry $registry)
 Announce resources this renderer requires. More...
 
- Public Member Functions inherited from ILIAS\UI\Implementation\Render\AbstractComponentRenderer
 __construct (private Factory $ui_factory, private TemplateFactory $tpl_factory, private ilLanguage $lng, private JavaScriptBinding $js_binding, private \ILIAS\Refinery\Factory $refinery, private ImagePathResolver $image_path_resolver, private DataFactory $data_factory, private HelpTextRetriever $help_text_retriever, private UploadLimitResolver $upload_limit_resolver,)
 
 registerResources (ResourceRegistry $registry)
 Announce resources this renderer requires. More...
 
 txt (string $id)
 Get a text from the language file. More...
 
 toJS ($key)
 Add language var to client side (il.Language) More...
 
 getLangKey ()
 Get current language key. More...
 
 getImagePathResolver ()
 
 getHelpText (Help\Purpose $purpose, Help\Topic ... $topics)
 
- 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...
 
- Public Member Functions inherited from ILIAS\UI\HelpTextRetriever
 getHelpText (Help\Purpose $purpose, Help\Topic ... $topics)
 Try to find according help texts for the purpose an topics. More...
 

Protected Member Functions

 getComponentInterfaceName ()
 
- Protected Member Functions inherited from ILIAS\UI\Implementation\Render\AbstractComponentRenderer
 getUIFactory ()
 Get a UI factory. More...
 
 getDataFactory ()
 
 getRefinery ()
 
 getUploadLimitResolver ()
 
 getJavascriptBinding ()
 
 getTemplate (string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
 Get template of component this renderer is made for. More...
 
 getTemplatePath (string $name)
 Get the path to the template of this component. More...
 
 bindJavaScript (JavaScriptBindable $component)
 Bind the component to JavaScript. More...
 
 createId ()
 Get a fresh unique id. More...
 
 checkComponent (Component $component)
 Check if a given component fits this renderer and throw if that is not the case. More...
 
 getComponentInterfaceName ()
 Get the name of the component-interface this renderer is supposed to render. More...
 
 getTooltipRenderer ()
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\UI\Implementation\Render\AbstractComponentRenderer
TooltipRenderer $tooltip_renderer = null
 

Detailed Description

Definition at line 28 of file Renderer.php.

Member Function Documentation

◆ getComponentInterfaceName()

ILIAS\UI\Implementation\Component\Counter\Renderer::getComponentInterfaceName ( )
protected

Definition at line 59 of file Renderer.php.

59  : array
60  {
61  return array(Component\Counter\Counter::class);
62  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ registerResources()

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

Announce resources this renderer requires.

Implements ILIAS\UI\Implementation\Render\ComponentRenderer.

Definition at line 50 of file Renderer.php.

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

50  : void
51  {
52  parent::registerResources($registry);
53  $registry->register('./components/ILIAS/UI/src/templates/js/Counter/dist/counter.js');
54  }
+ Here is the call graph for this function:

◆ render()

ILIAS\UI\Implementation\Component\Counter\Renderer::render ( Component\Component  $component,
RendererInterface  $default_renderer 
)

Definition at line 33 of file Renderer.php.

References ILIAS\UI\Implementation\Render\AbstractComponentRenderer\checkComponent(), and ILIAS\UI\Implementation\Render\AbstractComponentRenderer\getTemplate().

33  : string
34  {
35  $this->checkComponent($component);
36 
37  $tpl = $this->getTemplate("tpl.counter.html", true, true);
38  if ($component->getNumber() === 0) {
39  $tpl->touchBlock("hidden_" . $component->getType());
40  }
41  $tpl->setCurrentBlock($component->getType());
42  $tpl->setVariable("NUMBER", $component->getNumber());
43  $tpl->parseCurrentBlock();
44  return $tpl->get();
45  }
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
+ Here is the call graph for this function:

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