ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilKioskPageRenderer Class Reference

Class ilKioskPageRenderer. More...

+ 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 ($toc, Icon $icon)
 
 render (string $lso_title, LSControlBuilder $control_builder, string $obj_title, Component $icon, array $content)
 

Detailed Description

Class ilKioskPageRenderer.

Definition at line 17 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 19 of file class.ilKioskPageRenderer.php.

References $lng.

29  {
30  $this->il_tpl = $il_global_template;
31  $this->layout_meta_content = $layout_meta_content;
32  $this->ui_factory = $ui_factory;
33  $this->ui_renderer = $ui_renderer;
34  $this->lng = $lng;
35  $this->tpl = $kiosk_template;
36  $this->toc_gui = $toc_gui;
37  $this->loc_gui = $loc_gui;
38  $this->window_base_title = $window_base_title;
39  }
$lng

Member Function Documentation

◆ buildCurriculumSlate()

ilKioskPageRenderer::buildCurriculumSlate ( Workflow  $curriculum)

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

References Vendor\Package\$f.

41  : Slate
42  {
43  $f = $this->ui_factory;
44  return $this->ui_factory->maincontrols()->slate()->legacy(
45  $this->lng->txt('lso_mainbar_button_label_curriculum'),
46  $f->symbol()->icon()->standard("lso", "Learning Sequence")
47  ->withIsOutlined(true),
48  $this->ui_factory->legacy(
49  $this->ui_renderer->render($curriculum)
50  )
51  );
52  }

◆ buildToCSlate()

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

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

References ILIAS\UI\Component\Symbol\Icon\Icon\withSize().

55  : Slate
56  {
57  $html = $this->toc_gui
58  ->withStructure($toc->toJSON())
59  ->getHTML();
60  return $this->ui_factory->maincontrols()->slate()->legacy(
61  $this->lng->txt('lso_mainbar_button_label_toc'),
62  $icon->withSize("small")->withIsOutlined(true),
63  $this->ui_factory->legacy($html)
64  );
65  }
withSize($size)
Set the size for this icon.
+ Here is the call graph for this function:

◆ render()

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

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

References LSControlBuilder\getAdditionalJS(), LSControlBuilder\getControls(), LSControlBuilder\getDoneControl(), LSControlBuilder\getLocator(), LSControlBuilder\getModeControls(), LSControlBuilder\getNextControl(), LSControlBuilder\getPreviousControl(), and LSControlBuilder\getStartControl().

74  : string {
75  $this->tpl->setVariable(
76  "OBJECT_ICON",
77  $this->ui_renderer->render($icon)
78  );
79  $this->tpl->setVariable("OBJECT_TITLE", $obj_title);
80 
81  $this->tpl->setVariable(
82  "PLAYER_NAVIGATION",
83  $this->ui_renderer->render([
84  $control_builder->getPreviousControl(),
85  $control_builder->getNextControl()
86  ])
87  );
88 
89  $controls = $control_builder->getControls();
90 
91  //ensure done control is first element
92  if ($control_builder->getDoneControl()) {
93  array_unshift($controls, $control_builder->getDoneControl());
94  }
95  //also shift start control up front - this is for legacy-views only!
96  if ($control_builder->getStartControl()) {
97  array_unshift($controls, $control_builder->getStartControl());
98  $this->tpl->setVariable("JS_INLINE", $control_builder->getAdditionalJS());
99  }
100 
101  //TODO: insert toggles
102 
103  $this->tpl->setVariable(
104  "OBJ_NAVIGATION",
105  $this->ui_renderer->render($controls)
106  );
107 
108 
109  $this->tpl->setVariable(
110  "VIEW_MODES",
111  $this->ui_renderer->render($control_builder->getModeControls())
112  );
113 
114  if ($control_builder->getLocator()) {
115  $this->tpl->setVariable(
116  'LOCATOR',
117  $this->ui_renderer->render(
118  $this->loc_gui
119  ->withItems($control_builder->getLocator()->getItems())
120  ->getComponent()
121  )
122  );
123  }
124 
125  $this->tpl->setVariable(
126  'CONTENT',
127  $this->ui_renderer->render($content)
128  );
129 
130  return $this->tpl->get();
131  }
+ Here is the call graph for this function:

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