ILIAS  trunk Revision v5.2.0beta1-34132-g2d4d73d4a0
ILIAS\UI\Implementation\Component\Divider\Renderer Class Reference
+ Inheritance diagram for ILIAS\UI\Implementation\Component\Divider\Renderer:
+ Collaboration diagram for ILIAS\UI\Implementation\Component\Divider\Renderer:

Public Member Functions

 render (Component\Component $component, RendererInterface $default_renderer)
 
- 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

 renderDividerHorizontal (Component\Divider\Horizontal $component)
 
 renderDividerVertical ()
 
 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 27 of file Renderer.php.

Member Function Documentation

◆ getComponentInterfaceName()

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

Definition at line 75 of file Renderer.php.

75  : array
76  {
77  return [
78  Component\Divider\Horizontal::class,
79  Component\Divider\Vertical::class
80  ];
81  }

◆ render()

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

Definition at line 32 of file Renderer.php.

References ILIAS\UI\Implementation\Render\AbstractComponentRenderer\checkComponent(), ILIAS\UI\Implementation\Component\Divider\Renderer\renderDividerHorizontal(), and ILIAS\UI\Implementation\Component\Divider\Renderer\renderDividerVertical().

32  : string
33  {
34  $this->checkComponent($component);
35 
36  if ($component instanceof Component\Divider\Horizontal) {
37  return $this->renderDividerHorizontal($component);
38  }
39  if ($component instanceof Component\Divider\Vertical) {
40  return $this->renderDividerVertical();
41  }
42  return "";
43  }
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
renderDividerHorizontal(Component\Divider\Horizontal $component)
Definition: Renderer.php:45
+ Here is the call graph for this function:

◆ renderDividerHorizontal()

ILIAS\UI\Implementation\Component\Divider\Renderer::renderDividerHorizontal ( Component\Divider\Horizontal  $component)
protected

Definition at line 45 of file Renderer.php.

References ILIAS\UI\Implementation\Render\AbstractComponentRenderer\getTemplate().

Referenced by ILIAS\UI\Implementation\Component\Divider\Renderer\render().

45  : string
46  {
47  $tpl = $this->getTemplate("tpl.horizontal.html", true, true);
48 
49  $label = $component->getLabel();
50 
51  if ($label !== null) {
52  $tpl->setCurrentBlock("label");
53  $tpl->setVariable("LABEL", $label);
54  $tpl->parseCurrentBlock();
55  $tpl->touchBlock("with_label");
56  } else {
57  $tpl->touchBlock("divider");
58  }
59 
60  return $tpl->get();
61  }
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:
+ Here is the caller graph for this function:

◆ renderDividerVertical()

ILIAS\UI\Implementation\Component\Divider\Renderer::renderDividerVertical ( )
protected

Definition at line 63 of file Renderer.php.

References ILIAS\UI\Implementation\Render\AbstractComponentRenderer\getTemplate().

Referenced by ILIAS\UI\Implementation\Component\Divider\Renderer\render().

63  : string
64  {
65  $tpl = $this->getTemplate("tpl.vertical.html", true, true);
66 
67  $tpl->touchBlock("divider");
68 
69  return $tpl->get();
70  }
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:
+ Here is the caller graph for this function:

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