19declare(strict_types=1);
33 public function __construct($a_parent_obj, $a_parent_cmd,
bool $disable =
false)
36 $this->uiFactory =
$DIC->ui()->factory();
37 $this->uiRenderer =
$DIC->ui()->renderer();
41 $this->
lng->loadLanguageModule(
'mme');
48 'tpl.dashboard_sortation_row.html',
49 'components/ILIAS/Dashboard'
57 $this->
addColumn($this->
lng->txt(
'topitem_position'),
'',
'30px');
62 public function initData(
bool $disable =
false): void
65 'position' => $this->uiRenderer->render(
66 $this->uiFactory->divider()->horizontal()->withLabel($this->lng->txt(
'dash_main_panel'))
69 'active_checkbox' =>
''
73 foreach ($this->viewSettings->getViewPositions() as $presentation_view) {
74 $presentation_cb =
new ilCheckboxInputGUI(
'',
'main_panel[enable][' . $presentation_view .
']');
75 $presentation_cb->setChecked($this->viewSettings->isViewEnabled($presentation_view));
76 $presentation_cb->setValue(
'1');
77 $presentation_cb->setDisabled(
81 $position_input =
new ilNumberInputGUI(
'',
'main_panel[position][' . $presentation_view .
']');
82 $position_input->setSize(3);
83 $position_input->setValue((
string) (++$position * 10));
84 $position_input->setDisabled($disable);
87 'position' => $position_input->render(),
88 'title' => $this->
lng->txt(
'dash_enable_' . $this->viewSettings->getViewName($presentation_view)),
89 'active_checkbox' => $presentation_cb->render()
94 'position' => $this->uiRenderer->render(
95 $this->uiFactory->divider()->horizontal()->withLabel($this->lng->txt(
'dash_side_panel'))
98 'active_checkbox' =>
''
103 foreach ($this->side_panel_settings->getPositions() as $mod) {
104 $side_panel_module_cb =
new ilCheckboxInputGUI(
'',
'side_panel[enable][' . $mod .
']');
105 $side_panel_module_cb->setChecked($this->side_panel_settings->isEnabled($mod));
106 $side_panel_module_cb->setDisabled($disable);
108 $position_input =
new ilNumberInputGUI(
'',
'side_panel[position][' . $mod .
']');
109 $position_input->setSize(3);
110 $position_input->setValue((
string) (++$position * 10));
111 $position_input->setDisabled($disable);
114 'position' => $position_input->render(),
115 'title' => $this->
lng->txt(
'dash_enable_' . $mod),
116 'active_checkbox' => $side_panel_module_cb->render()
Builds a Color from either hex- or rgb values.
__construct($a_parent_obj, $a_parent_cmd, bool $disable=false)
ilDashboardSidePanelSettingsRepository $side_panel_settings
ilPDSelectedItemsBlockViewSettings $viewSettings
initData(bool $disable=false)
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