19declare(strict_types=1);
34 $this->ui_factory =
$DIC->ui()->factory();
35 $this->ui_renderer =
$DIC->ui()->renderer();
39 $this->
lng->loadLanguageModule(
'mme');
46 'tpl.dashboard_sortation_row.html',
47 'components/ILIAS/Dashboard'
55 $this->
addColumn($this->
lng->txt(
'topitem_position'),
'',
'30px');
60 public function initData(
bool $disable =
false): void
63 'position' => $this->ui_renderer->render(
64 $this->ui_factory->divider()->horizontal()->withLabel($this->lng->txt(
'dash_main_panel'))
67 'active_checkbox' =>
''
71 foreach ($this->view_settings->getViewPositions() as $presentation_view) {
72 $presentation_cb =
new ilCheckboxInputGUI(
'',
'main_panel[enable][' . $presentation_view .
']');
73 $presentation_cb->setChecked($this->view_settings->isViewEnabled($presentation_view));
74 $presentation_cb->setValue(
'1');
75 $presentation_cb->setDisabled(
79 $position_input =
new ilNumberInputGUI(
'',
'main_panel[position][' . $presentation_view .
']');
80 $position_input->setSize(3);
81 $position_input->setValue((
string) (++$position * 10));
82 $position_input->setDisabled($disable);
85 'position' => $position_input->render(),
86 'title' => $this->
lng->txt(
'dash_enable_' . $this->view_settings->getViewName($presentation_view)),
87 'active_checkbox' => $presentation_cb->render()
92 'position' => $this->ui_renderer->render(
93 $this->ui_factory->divider()->horizontal()->withLabel($this->lng->txt(
'dash_side_panel'))
96 'active_checkbox' =>
''
101 foreach ($this->side_panel_settings->getPositions() as $mod) {
102 $side_panel_module_cb =
new ilCheckboxInputGUI(
'',
'side_panel[enable][' . $mod .
']');
103 $side_panel_module_cb->setChecked($this->side_panel_settings->isEnabled($mod));
104 $side_panel_module_cb->setDisabled($disable);
106 $position_input =
new ilNumberInputGUI(
'',
'side_panel[position][' . $mod .
']');
107 $position_input->setSize(3);
108 $position_input->setValue((
string) (++$position * 10));
109 $position_input->setDisabled($disable);
112 'position' => $position_input->render(),
113 'title' => $this->
lng->txt(
'dash_enable_' . $mod),
114 'active_checkbox' => $side_panel_module_cb->render()
Builds a Color from either hex- or rgb values.
readonly ilDashboardSidePanelSettingsRepository $side_panel_settings
__construct(ilObjectGUI $a_parent_obj, string $a_parent_cmd, bool $disable=false)
readonly Renderer $ui_renderer
initData(bool $disable=false)
readonly Factory $ui_factory
readonly ilPDSelectedItemsBlockViewSettings $view_settings
Class ilObjectGUI Basic methods of all Output classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setEnableNumInfo(bool $a_val)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
This is how the factory for UI elements looks.
An entity that renders components to a string output.
const VIEW_RECOMMENDED_CONTENT
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc