ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPublicSectionSettings 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 ilPublicSectionSettings:

Public Member Functions

 setDomains (array $domains)
 
 getDomains ()
 
 isEnabled ()
 
 isEnabledForDomain (string $a_domain)
 
 setEnabled (bool $stat)
 
 save ()
 

Static Public Member Functions

static getInstance ()
 

Protected Member Functions

 read ()
 read settings More...
 

Static Protected Attributes

static $instance = null
 

Private Member Functions

 __construct ()
 read settings More...
 

Private Attributes

ilSetting $settings
 
bool $enabled = false
 
array $domains = array()
 

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 Description of class class

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilPublicSectionSettings::__construct ( )
private

read settings

Definition at line 42 of file class.ilPublicSectionSettings.php.

43 {
44 global $DIC;
45
46 $this->settings = $DIC->settings();
47 $this->read();
48 }
global $DIC
Definition: shib_login.php:26

References $DIC, read(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ getDomains()

ilPublicSectionSettings::getDomains ( )
Returns
string[]

Definition at line 70 of file class.ilPublicSectionSettings.php.

70 : array
71 {
72 return $this->domains;
73 }

References $domains.

Referenced by isEnabledForDomain(), and save().

+ Here is the caller graph for this function:

◆ getInstance()

static ilPublicSectionSettings::getInstance ( )
static

Definition at line 50 of file class.ilPublicSectionSettings.php.

51 {
52 if (!self::$instance) {
53 self::$instance = new self();
54 }
55 return self::$instance;
56 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $instance.

Referenced by ilRepositoryGUI\executeCommand(), ilInitialisation\handleAuthenticationFail(), ilStartUpGUI\processIndexPHP(), ilObjSystemFolderGUI\saveBasicSettingsObject(), ilStartUpGUI\showLogout(), and ilStartUpGUI\showRegistrationLinks().

+ Here is the caller graph for this function:

◆ isEnabled()

ilPublicSectionSettings::isEnabled ( )

Definition at line 75 of file class.ilPublicSectionSettings.php.

75 : bool
76 {
77 return $this->enabled;
78 }

References $enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isEnabledForDomain()

ilPublicSectionSettings::isEnabledForDomain ( string  $a_domain)

Definition at line 80 of file class.ilPublicSectionSettings.php.

80 : bool
81 {
82 if (!$this->enabled) {
83 return false;
84 }
85 if (count($this->domains)) {
86 if (in_array(trim($a_domain), $this->getDomains())) {
87 return true;
88 } else {
89 return false;
90 }
91 }
92 return true;
93 }

References getDomains().

+ Here is the call graph for this function:

◆ read()

ilPublicSectionSettings::read ( )
protected

read settings

Definition at line 109 of file class.ilPublicSectionSettings.php.

109 : void
110 {
111 $this->enabled = (bool) $this->settings->get('pub_section', (string) $this->enabled);
112 $domains = $this->settings->get('pub_section_domains', serialize($this->domains));
113 $this->domains = (array) unserialize($domains);
114 }

References $domains, $enabled, and ILIAS\Repository\settings().

Referenced by __construct().

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

◆ save()

ilPublicSectionSettings::save ( )

Definition at line 100 of file class.ilPublicSectionSettings.php.

100 : void
101 {
102 $this->settings->set('pub_section', (string) $this->isEnabled());
103 $this->settings->set('pub_section_domains', serialize($this->getDomains()));
104 }

References getDomains(), isEnabled(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ setDomains()

ilPublicSectionSettings::setDomains ( array  $domains)
Parameters
string[]$domains

Definition at line 61 of file class.ilPublicSectionSettings.php.

61 : void
62 {
63 $this->domains = $domains;
64 }

References $domains.

◆ setEnabled()

ilPublicSectionSettings::setEnabled ( bool  $stat)

Definition at line 95 of file class.ilPublicSectionSettings.php.

95 : void
96 {
97 $this->enabled = $stat;
98 }

Field Documentation

◆ $domains

array ilPublicSectionSettings::$domains = array()
private

Definition at line 37 of file class.ilPublicSectionSettings.php.

Referenced by getDomains(), read(), and setDomains().

◆ $enabled

bool ilPublicSectionSettings::$enabled = false
private

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

Referenced by isEnabled(), and read().

◆ $instance

ilPublicSectionSettings::$instance = null
staticprotected

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

Referenced by getInstance().

◆ $settings

ilSetting ilPublicSectionSettings::$settings
private

Definition at line 30 of file class.ilPublicSectionSettings.php.


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