ILIAS  release_8 Revision v8.23
ilPublicSectionSettings Class Reference

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

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 9 of file class.ilPublicSectionSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilPublicSectionSettings::__construct ( )
private

read settings

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

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

29  {
30  global $DIC;
31 
32  $this->settings = $DIC->settings();
33  $this->read();
34  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getDomains()

ilPublicSectionSettings::getDomains ( )
Returns
string[]

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

References $domains.

Referenced by isEnabledForDomain(), and save().

56  : array
57  {
58  return $this->domains;
59  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilPublicSectionSettings::getInstance ( )
static

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

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

37  {
38  if (!self::$instance) {
39  self::$instance = new self();
40  }
41  return self::$instance;
42  }
Description of class class.
+ Here is the caller graph for this function:

◆ isEnabled()

ilPublicSectionSettings::isEnabled ( )

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

References $enabled.

Referenced by save().

61  : bool
62  {
63  return $this->enabled;
64  }
+ Here is the caller graph for this function:

◆ isEnabledForDomain()

ilPublicSectionSettings::isEnabledForDomain ( string  $a_domain)

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

References getDomains().

66  : bool
67  {
68  if (!$this->enabled) {
69  return false;
70  }
71  if (count($this->domains)) {
72  if (in_array(trim($a_domain), $this->getDomains())) {
73  return true;
74  } else {
75  return false;
76  }
77  }
78  return true;
79  }
+ Here is the call graph for this function:

◆ read()

ilPublicSectionSettings::read ( )
protected

read settings

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

References ILIAS\Repository\settings().

Referenced by __construct().

95  : void
96  {
97  $this->enabled = (bool) $this->settings->get('pub_section', (string) $this->enabled);
98  $domains = $this->settings->get('pub_section_domains', serialize($this->domains));
99  $this->domains = (array) unserialize($domains);
100  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilPublicSectionSettings::save ( )

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

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

86  : void
87  {
88  $this->settings->set('pub_section', (string) $this->isEnabled());
89  $this->settings->set('pub_section_domains', serialize($this->getDomains()));
90  }
+ Here is the call graph for this function:

◆ setDomains()

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

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

References $domains.

47  : void
48  {
49  $this->domains = $domains;
50  }

◆ setEnabled()

ilPublicSectionSettings::setEnabled ( bool  $stat)

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

81  : void
82  {
83  $this->enabled = $stat;
84  }

Field Documentation

◆ $domains

array ilPublicSectionSettings::$domains = array()
private

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

Referenced by getDomains(), and setDomains().

◆ $enabled

bool ilPublicSectionSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $instance

ilPublicSectionSettings::$instance = null
staticprotected

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

◆ $settings

ilSetting ilPublicSectionSettings::$settings
private

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


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