ILIAS  release_8 Revision v8.24
ilKioskPageRenderer Class Reference
+ Collaboration diagram for ilKioskPageRenderer:

Public Member Functions

 __construct (ilGlobalPageTemplate $il_global_template, MetaContent $layout_meta_content, Factory $ui_factory, Renderer $ui_renderer, ilLanguage $lng, ilTemplate $kiosk_template, ilLSTOCGUI $toc_gui, ilLSLocatorGUI $loc_gui, string $window_base_title)
 
 buildCurriculumSlate (Workflow $curriculum)
 
 buildToCSlate (LSTOCBuilder $toc, Icon $icon)
 
 render (LSControlBuilder $control_builder, string $obj_title, Component $icon, array $content)
 

Protected Attributes

ilGlobalPageTemplate $il_tpl
 
MetaContent $layout_meta_content
 
Factory $ui_factory
 
Renderer $ui_renderer
 
ilLanguage $lng
 
ilTemplate $tpl
 
ilLSTOCGUI $toc_gui
 
ilLSLocatorGUI $loc_gui
 
string $window_base_title
 

Detailed Description

Definition at line 29 of file class.ilKioskPageRenderer.php.

Constructor & Destructor Documentation

◆ __construct()

ilKioskPageRenderer::__construct ( ilGlobalPageTemplate  $il_global_template,
MetaContent  $layout_meta_content,
Factory  $ui_factory,
Renderer  $ui_renderer,
ilLanguage  $lng,
ilTemplate  $kiosk_template,
ilLSTOCGUI  $toc_gui,
ilLSLocatorGUI  $loc_gui,
string  $window_base_title 
)

Definition at line 41 of file class.ilKioskPageRenderer.php.

51 {
52 $this->il_tpl = $il_global_template;
53 $this->layout_meta_content = $layout_meta_content;
54 $this->ui_factory = $ui_factory;
55 $this->ui_renderer = $ui_renderer;
56 $this->lng = $lng;
57 $this->tpl = $kiosk_template;
58 $this->toc_gui = $toc_gui;
59 $this->loc_gui = $loc_gui;
60 $this->window_base_title = $window_base_title;
61 }

References $layout_meta_content, $lng, $loc_gui, $toc_gui, $ui_factory, $ui_renderer, $window_base_title, and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildCurriculumSlate()

ilKioskPageRenderer::buildCurriculumSlate ( Workflow  $curriculum)

Definition at line 63 of file class.ilKioskPageRenderer.php.

63 : Slate
64 {
66 return $this->ui_factory->maincontrols()->slate()->legacy(
67 $this->lng->txt('lso_mainbar_button_label_curriculum'),
68 $f->symbol()->icon()->standard("lso", "Learning Sequence"),
69 $this->ui_factory->legacy(
70 $this->ui_renderer->render($curriculum)
71 )
72 );
73 }
legacy(string $content)

References Vendor\Package\$f, $ui_factory, ILIAS\UI\Factory\legacy(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ buildToCSlate()

ilKioskPageRenderer::buildToCSlate ( LSTOCBuilder  $toc,
Icon  $icon 
)

Definition at line 75 of file class.ilKioskPageRenderer.php.

75 : Slate
76 {
77 $html = $this->toc_gui
78 ->withStructure($toc->toJSON())
79 ->getHTML();
80 return $this->ui_factory->maincontrols()->slate()->legacy(
81 $this->lng->txt('lso_mainbar_button_label_toc'),
82 $icon->withSize("small"),
83 $this->ui_factory->legacy($html)
84 );
85 }
withSize(string $size)
Set the size for this icon.

References ILIAS\Repository\lng(), LSTOCBuilder\toJSON(), and ILIAS\UI\Component\Symbol\Icon\Icon\withSize().

+ Here is the call graph for this function:

◆ render()

ilKioskPageRenderer::render ( LSControlBuilder  $control_builder,
string  $obj_title,
Component  $icon,
array  $content 
)

Definition at line 88 of file class.ilKioskPageRenderer.php.

93 : string {
94 $this->tpl->setVariable(
95 "OBJECT_ICON",
96 $this->ui_renderer->render($icon)
97 );
98 $this->tpl->setVariable("OBJECT_TITLE", $obj_title);
99
100 $this->tpl->setVariable(
101 "PLAYER_NAVIGATION",
102 $this->ui_renderer->render([
103 $control_builder->getPreviousControl(),
104 $control_builder->getNextControl()
105 ])
106 );
107
108 $controls = $control_builder->getControls();
109
110 //ensure done control is first element
111 if ($control_builder->getDoneControl()) {
112 array_unshift($controls, $control_builder->getDoneControl());
113 }
114 //also shift start control up front - this is for legacy-views only!
115 if ($control_builder->getStartControl()) {
116 array_unshift($controls, $control_builder->getStartControl());
117 $this->tpl->setVariable("JS_INLINE", $control_builder->getAdditionalJS());
118 }
119
120 //TODO: insert toggles
121
122 $this->tpl->setVariable(
123 "OBJ_NAVIGATION",
124 $this->ui_renderer->render($controls)
125 );
126
127
128 $this->tpl->setVariable(
129 "VIEW_MODES",
130 $this->ui_renderer->render($control_builder->getModeControls())
131 );
132
133 if ($control_builder->getLocator()) {
134 $this->tpl->setVariable(
135 'LOCATOR',
136 $this->ui_renderer->render(
137 $this->loc_gui
138 ->withItems($control_builder->getLocator()->getItems())
139 ->getComponent()
140 )
141 );
142 }
143
144 $this->tpl->setVariable(
145 'CONTENT',
146 $this->ui_renderer->render($content)
147 );
148
149 return $this->tpl->get();
150 }

References LSControlBuilder\getDoneControl().

+ Here is the call graph for this function:

Field Documentation

◆ $il_tpl

ilGlobalPageTemplate ilKioskPageRenderer::$il_tpl
protected

Definition at line 31 of file class.ilKioskPageRenderer.php.

◆ $layout_meta_content

MetaContent ilKioskPageRenderer::$layout_meta_content
protected

Definition at line 32 of file class.ilKioskPageRenderer.php.

Referenced by __construct().

◆ $lng

ilLanguage ilKioskPageRenderer::$lng
protected

Definition at line 35 of file class.ilKioskPageRenderer.php.

Referenced by __construct().

◆ $loc_gui

ilLSLocatorGUI ilKioskPageRenderer::$loc_gui
protected

Definition at line 38 of file class.ilKioskPageRenderer.php.

Referenced by __construct().

◆ $toc_gui

ilLSTOCGUI ilKioskPageRenderer::$toc_gui
protected

Definition at line 37 of file class.ilKioskPageRenderer.php.

Referenced by __construct().

◆ $tpl

ilTemplate ilKioskPageRenderer::$tpl
protected

Definition at line 36 of file class.ilKioskPageRenderer.php.

◆ $ui_factory

Factory ilKioskPageRenderer::$ui_factory
protected

Definition at line 33 of file class.ilKioskPageRenderer.php.

Referenced by __construct(), and buildCurriculumSlate().

◆ $ui_renderer

Renderer ilKioskPageRenderer::$ui_renderer
protected

Definition at line 34 of file class.ilKioskPageRenderer.php.

Referenced by __construct().

◆ $window_base_title

string ilKioskPageRenderer::$window_base_title
protected

Definition at line 39 of file class.ilKioskPageRenderer.php.

Referenced by __construct().


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