ILIAS  release_7 Revision v7.30-3-g800a261c036
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 }
ILIAS Setting Class.

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.

60 {
61 if ($this->isValidModule($mod)) {
62 $this->setting->set("enable_" . $mod, (int) $active);
63 }
64 }

References isValidModule().

+ Here is the call graph for this function:

◆ getValidModules()

ilDashboardSidePanelSettingsRepository::getValidModules ( )

◆ isEnabled()

ilDashboardSidePanelSettingsRepository::isEnabled ( string  $mod)

Is enabled.

Parameters
string$mod
Returns
bool

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

72 : bool
73 {
74 if ($this->isValidModule($mod)) {
75 return (bool) $this->setting->get("enable_" . $mod, true);
76 }
77 return false;
78 }

References isValidModule().

+ 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.

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

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

◆ CALENDAR

const ilDashboardSidePanelSettingsRepository::CALENDAR = "cal"

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

Referenced by getValidModules().

◆ MAIL

const ilDashboardSidePanelSettingsRepository::MAIL = "mail"

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

Referenced by getValidModules().

◆ NEWS

const ilDashboardSidePanelSettingsRepository::NEWS = "news"

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

Referenced by getValidModules().

◆ TASKS

const ilDashboardSidePanelSettingsRepository::TASKS = "task"

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

Referenced by getValidModules().


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