ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilDashboardSidePanelSettingsRepository Class Reference

Dashboard side panel settings Repo. More...

+ Collaboration diagram for ilDashboardSidePanelSettingsRepository:

Public Member Functions

 __construct (ilSetting $dashboard_settings=null)
 Constructor. More...
 
 getValidModules ()
 Get valid modules. More...
 
 enable (string $mod, bool $active)
 Enable. More...
 
 isEnabled (string $mod)
 Is enabled. More...
 

Data Fields

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

Protected Member Functions

 isValidModule (string $mod)
 

Detailed Description

Dashboard side panel settings Repo.

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilDashboardSidePanelSettingsRepository::__construct ( ilSetting  $dashboard_settings = null)

Constructor.

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

21  {
22  $this->setting = is_null($dashboard_settings)
23  ? new ilSetting("dash")
24  : $dashboard_settings;
25  }

Member Function Documentation

◆ enable()

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

Enable.

Parameters
string$mod
bool$active

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

References isValidModule().

60  {
61  if ($this->isValidModule($mod)) {
62  $this->setting->set("enable_" . $mod, (int) $active);
63  }
64  }
+ Here is the call graph for this function:

◆ getValidModules()

ilDashboardSidePanelSettingsRepository::getValidModules ( )

Get valid modules.

Returns
array

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

Referenced by isValidModule().

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

◆ isEnabled()

ilDashboardSidePanelSettingsRepository::isEnabled ( string  $mod)

Is enabled.

Parameters
string$mod
Returns
bool

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

References isValidModule().

72  : bool
73  {
74  if ($this->isValidModule($mod)) {
75  return (bool) $this->setting->get("enable_" . $mod, true);
76  }
77  return false;
78  }
+ Here is the call graph for this function:

◆ isValidModule()

ilDashboardSidePanelSettingsRepository::isValidModule ( string  $mod)
protected
Parameters
string$mod
Returns
bool

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

References getValidModules().

Referenced by enable(), and isEnabled().

47  : bool
48  {
49  return in_array($mod, $this->getValidModules());
50  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ 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: