ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
class.ilDashboardSidePanelSettingsRepository.php
Go to the documentation of this file.
1
<?php
2
19
class
ilDashboardSidePanelSettingsRepository
20
{
21
public
const
CALENDAR
=
"cal"
;
22
public
const
NEWS
=
"news"
;
23
public
const
MAIL
=
"mail"
;
24
public
const
TASKS
=
"task"
;
25
26
protected
ilSetting
$setting
;
27
28
public
function
__construct
(
ilSetting
$dashboard_settings = null)
29
{
30
$this->setting = is_null($dashboard_settings)
31
?
new
ilSetting
(
"dash"
)
32
: $dashboard_settings;
33
}
34
35
public
function
getValidModules
(): array
36
{
37
return
[
38
self::CALENDAR,
39
self::NEWS,
40
self::MAIL,
41
self::TASKS
42
];
43
}
44
45
protected
function
isValidModule
(
string
$mod): bool
46
{
47
return
in_array($mod, $this->
getValidModules
());
48
}
49
50
51
// Enable module
52
public
function
enable
(
string
$mod,
bool
$active): void
53
{
54
if
($this->
isValidModule
($mod)) {
55
$this->setting->set(
"enable_"
. $mod, (
int
) $active);
56
}
57
}
58
59
// Is module enabled?
60
public
function
isEnabled
(
string
$mod): bool
61
{
62
if
($this->
isValidModule
($mod)) {
63
return
(
bool
) $this->setting->get(
"enable_"
. $mod,
true
);
64
}
65
return
false
;
66
}
67
}
ilDashboardSidePanelSettingsRepository\TASKS
const TASKS
Definition:
class.ilDashboardSidePanelSettingsRepository.php:24
ilDashboardSidePanelSettingsRepository\__construct
__construct(ilSetting $dashboard_settings=null)
Definition:
class.ilDashboardSidePanelSettingsRepository.php:28
ilDashboardSidePanelSettingsRepository\isEnabled
isEnabled(string $mod)
Definition:
class.ilDashboardSidePanelSettingsRepository.php:60
ilDashboardSidePanelSettingsRepository\MAIL
const MAIL
Definition:
class.ilDashboardSidePanelSettingsRepository.php:23
ilDashboardSidePanelSettingsRepository
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilDashboardSidePanelSettingsRepository.php:19
ilDashboardSidePanelSettingsRepository\CALENDAR
const CALENDAR
Definition:
class.ilDashboardSidePanelSettingsRepository.php:21
ilDashboardSidePanelSettingsRepository\isValidModule
isValidModule(string $mod)
Definition:
class.ilDashboardSidePanelSettingsRepository.php:45
ilDashboardSidePanelSettingsRepository\getValidModules
getValidModules()
Definition:
class.ilDashboardSidePanelSettingsRepository.php:35
ilDashboardSidePanelSettingsRepository\enable
enable(string $mod, bool $active)
Definition:
class.ilDashboardSidePanelSettingsRepository.php:52
ilDashboardSidePanelSettingsRepository\NEWS
const NEWS
Definition:
class.ilDashboardSidePanelSettingsRepository.php:22
ilDashboardSidePanelSettingsRepository\$setting
ilSetting $setting
Definition:
class.ilDashboardSidePanelSettingsRepository.php:26
ilSetting
Services
Dashboard
ItemsBlock
classes
class.ilDashboardSidePanelSettingsRepository.php
Generated on Sun Aug 31 2025 22:02:19 for ILIAS by
1.8.13 (using
Doxyfile
)