ILIAS  release_8 Revision v8.24
ilDashboardSidePanelSettingsRepository Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilDashboardSidePanelSettingsRepository:

Public Member Functions

 __construct (ilSetting $dashboard_settings=null)
 
 getValidModules ()
 
 enable (string $mod, bool $active)
 
 isEnabled (string $mod)
 

Data Fields

const CALENDAR = "cal"
 
const NEWS = "news"
 
const MAIL = "mail"
 
const TASKS = "task"
 

Protected Member Functions

 isValidModule (string $mod)
 

Protected Attributes

ilSetting $setting
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 19 of file class.ilDashboardSidePanelSettingsRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ilDashboardSidePanelSettingsRepository::__construct ( ilSetting  $dashboard_settings = null)

Definition at line 28 of file class.ilDashboardSidePanelSettingsRepository.php.

29 {
30 $this->setting = is_null($dashboard_settings)
31 ? new ilSetting("dash")
32 : $dashboard_settings;
33 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Member Function Documentation

◆ enable()

ilDashboardSidePanelSettingsRepository::enable ( string  $mod,
bool  $active 
)

Definition at line 52 of file class.ilDashboardSidePanelSettingsRepository.php.

52 : void
53 {
54 if ($this->isValidModule($mod)) {
55 $this->setting->set("enable_" . $mod, (int) $active);
56 }
57 }

References isValidModule().

+ Here is the call graph for this function:

◆ getValidModules()

◆ isEnabled()

ilDashboardSidePanelSettingsRepository::isEnabled ( string  $mod)

Definition at line 60 of file class.ilDashboardSidePanelSettingsRepository.php.

60 : bool
61 {
62 if ($this->isValidModule($mod)) {
63 return (bool) $this->setting->get("enable_" . $mod, true);
64 }
65 return false;
66 }

References isValidModule().

+ Here is the call graph for this function:

◆ isValidModule()

ilDashboardSidePanelSettingsRepository::isValidModule ( string  $mod)
protected

Definition at line 45 of file class.ilDashboardSidePanelSettingsRepository.php.

45 : bool
46 {
47 return in_array($mod, $this->getValidModules());
48 }

References getValidModules().

Referenced by enable(), and isEnabled().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $setting

ilSetting ilDashboardSidePanelSettingsRepository::$setting
protected

◆ CALENDAR

const ilDashboardSidePanelSettingsRepository::CALENDAR = "cal"

Definition at line 21 of file class.ilDashboardSidePanelSettingsRepository.php.

Referenced by getValidModules().

◆ MAIL

const ilDashboardSidePanelSettingsRepository::MAIL = "mail"

Definition at line 23 of file class.ilDashboardSidePanelSettingsRepository.php.

Referenced by getValidModules().

◆ NEWS

const ilDashboardSidePanelSettingsRepository::NEWS = "news"

Definition at line 22 of file class.ilDashboardSidePanelSettingsRepository.php.

Referenced by getValidModules().

◆ TASKS

const ilDashboardSidePanelSettingsRepository::TASKS = "task"

Definition at line 24 of file class.ilDashboardSidePanelSettingsRepository.php.

Referenced by getValidModules().


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