ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilKioskPageRenderer Class Reference
+ Collaboration diagram for ilKioskPageRenderer:

Public Member Functions

 __construct (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

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 ( 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 40 of file class.ilKioskPageRenderer.php.

49 {
50 $this->layout_meta_content = $layout_meta_content;
51 $this->ui_factory = $ui_factory;
52 $this->ui_renderer = $ui_renderer;
53 $this->lng = $lng;
54 $this->tpl = $kiosk_template;
55 $this->toc_gui = $toc_gui;
56 $this->loc_gui = $loc_gui;
57 $this->window_base_title = $window_base_title;
58 }

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 60 of file class.ilKioskPageRenderer.php.

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

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 72 of file class.ilKioskPageRenderer.php.

72 : Slate
73 {
74 $html = $this->toc_gui
75 ->withStructure($toc->toJSON())
76 ->getHTML();
77 return $this->ui_factory->maincontrols()->slate()->legacy(
78 $this->lng->txt('lso_mainbar_button_label_toc'),
79 $icon->withSize("small"),
80 $this->ui_factory->legacy()->content($html)
81 );
82 }
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 84 of file class.ilKioskPageRenderer.php.

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

References LSControlBuilder\getDoneControl().

+ Here is the call graph for this function:

Field Documentation

◆ $layout_meta_content

MetaContent ilKioskPageRenderer::$layout_meta_content
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilKioskPageRenderer::$lng
protected

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

Referenced by __construct().

◆ $loc_gui

ilLSLocatorGUI ilKioskPageRenderer::$loc_gui
protected

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

Referenced by __construct().

◆ $toc_gui

ilLSTOCGUI ilKioskPageRenderer::$toc_gui
protected

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

Referenced by __construct().

◆ $tpl

ilTemplate ilKioskPageRenderer::$tpl
protected

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

◆ $ui_factory

Factory ilKioskPageRenderer::$ui_factory
protected

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

Referenced by __construct(), and buildCurriculumSlate().

◆ $ui_renderer

Renderer ilKioskPageRenderer::$ui_renderer
protected

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

Referenced by __construct().

◆ $window_base_title

string ilKioskPageRenderer::$window_base_title
protected

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

Referenced by __construct().


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