ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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  }

Member Function Documentation

◆ enable()

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

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

References isValidModule().

52  : void
53  {
54  if ($this->isValidModule($mod)) {
55  $this->setting->set("enable_" . $mod, (int) $active);
56  }
57  }
+ Here is the call graph for this function:

◆ getValidModules()

ilDashboardSidePanelSettingsRepository::getValidModules ( )

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

Referenced by isValidModule().

35  : array
36  {
37  return [
38  self::CALENDAR,
39  self::NEWS,
40  self::MAIL,
41  self::TASKS
42  ];
43  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilDashboardSidePanelSettingsRepository::isEnabled ( string  $mod)

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

References isValidModule().

60  : bool
61  {
62  if ($this->isValidModule($mod)) {
63  return (bool) $this->setting->get("enable_" . $mod, true);
64  }
65  return false;
66  }
+ Here is the call graph for this function:

◆ isValidModule()

ilDashboardSidePanelSettingsRepository::isValidModule ( string  $mod)
protected

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

References getValidModules().

Referenced by enable(), and isEnabled().

45  : bool
46  {
47  return in_array($mod, $this->getValidModules());
48  }
+ 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"

◆ MAIL

const ilDashboardSidePanelSettingsRepository::MAIL = "mail"

◆ NEWS

const ilDashboardSidePanelSettingsRepository::NEWS = "news"

◆ TASKS

const ilDashboardSidePanelSettingsRepository::TASKS = "task"

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