ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPublicSectionSettings Class Reference

Description of class class. More...

+ Collaboration diagram for ilPublicSectionSettings:

Public Member Functions

 setDomains (array $domains)
 
 getDomains ()
 
 isEnabled ()
 
 isEnabledForDomain ($a_domain)
 Check if public section. More...
 
 setEnabled ($stat)
 
 save ()
 

Static Public Member Functions

static getInstance ()
 Get instance. More...
 

Protected Member Functions

 read ()
 read settings More...
 

Static Protected Attributes

static $instance = null
 

Private Member Functions

 __construct ()
 read settings More...
 

Private Attributes

 $settings = null
 
 $enabled = false
 
 $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 11 of file class.ilPublicSectionSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilPublicSectionSettings::__construct ( )
private

read settings

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

References $GLOBALS, read(), and settings().

31  {
32  $this->settings = $GLOBALS['DIC']->settings();
33  $this->read();
34  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

Member Function Documentation

◆ getDomains()

ilPublicSectionSettings::getDomains ( )

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

References $domains, and array.

Referenced by isEnabledForDomain(), and save().

54  {
55  return (array) $this->domains;
56  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getInstance()

static ilPublicSectionSettings::getInstance ( )
static

Get instance.

Returns

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

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

41  {
42  if (!self::$instance) {
43  self::$instance = new self();
44  }
45  return self::$instance;
46  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilPublicSectionSettings::isEnabled ( )

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

References $enabled.

Referenced by save().

+ Here is the caller graph for this function:

◆ isEnabledForDomain()

ilPublicSectionSettings::isEnabledForDomain (   $a_domain)

Check if public section.

Parameters
type$a_domain
Returns
boolean

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

References getDomains().

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

◆ read()

ilPublicSectionSettings::read ( )
protected

read settings

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

References $domains, and settings().

Referenced by __construct().

98  {
99  $this->enabled = $this->settings->get('pub_section', $this->enabled);
100 
101  $domains = $this->settings->get('pub_section_domains', serialize($this->domains));
102  $this->domains = unserialize($domains);
103  }
settings()
Definition: settings.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ save()

ilPublicSectionSettings::save ( )

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

References getDomains(), isEnabled(), and settings().

89  {
90  $this->settings->set('pub_section', $this->isEnabled());
91  $this->settings->set('pub_section_domains', serialize($this->getDomains()));
92  }
settings()
Definition: settings.php:2
+ Here is the call graph for this function:

◆ setDomains()

ilPublicSectionSettings::setDomains ( array  $domains)

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

References $domains.

49  {
50  $this->domains = $domains;
51  }

◆ setEnabled()

ilPublicSectionSettings::setEnabled (   $stat)

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

84  {
85  $this->enabled = $stat;
86  }

Field Documentation

◆ $domains

ilPublicSectionSettings::$domains = array()
private

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

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

◆ $enabled

ilPublicSectionSettings::$enabled = false
private

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

Referenced by isEnabled().

◆ $instance

ilPublicSectionSettings::$instance = null
staticprotected

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

◆ $settings

ilPublicSectionSettings::$settings = null
private

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


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