ILIAS  release_7 Revision v7.30-3-g800a261c036
ILIAS\ContentPage\GlobalSettings\StorageImpl Class Reference
+ Inheritance diagram for ILIAS\ContentPage\GlobalSettings\StorageImpl:
+ Collaboration diagram for ILIAS\ContentPage\GlobalSettings\StorageImpl:

Public Member Functions

 __construct (ilSetting $globalSettings)
 StorageImpl constructor. More...
 
 getSettings ()
 @inheritDoc More...
 
 store (Settings $settings)
 @inheritDoc More...
 
 getSettings ()
 
 store (Settings $settings)
 

Private Attributes

const P_READING_TIME_STATUS = 'reading_time_status'
 
 $globalSettings
 

Detailed Description

Definition at line 13 of file StorageImpl.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\ContentPage\GlobalSettings\StorageImpl::__construct ( ilSetting  $globalSettings)

StorageImpl constructor.

Parameters
ilSetting$globalSettings

Definition at line 24 of file StorageImpl.php.

25 {
26 $this->globalSettings = $globalSettings;
27 }

References ILIAS\ContentPage\GlobalSettings\StorageImpl\$globalSettings.

Member Function Documentation

◆ getSettings()

ILIAS\ContentPage\GlobalSettings\StorageImpl::getSettings ( )

@inheritDoc

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 32 of file StorageImpl.php.

32 : Settings
33 {
34 $settings = new Settings();
35
36 if ($this->globalSettings->get(self::P_READING_TIME_STATUS, false)) {
37 $settings = $settings->withEnabledReadingTime();
38 } else {
39 $settings = $settings->withDisabledReadingTime();
40 }
41
42 return $settings;
43 }

◆ store()

ILIAS\ContentPage\GlobalSettings\StorageImpl::store ( Settings  $settings)

@inheritDoc

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 48 of file StorageImpl.php.

48 : void
49 {
50 $this->globalSettings->set(self::P_READING_TIME_STATUS, ((string) (int) $settings->isReadingTimeEnabled()));
51 }

References ILIAS\ContentPage\GlobalSettings\Settings\isReadingTimeEnabled().

+ Here is the call graph for this function:

Field Documentation

◆ $globalSettings

ILIAS\ContentPage\GlobalSettings\StorageImpl::$globalSettings
private

◆ P_READING_TIME_STATUS

const ILIAS\ContentPage\GlobalSettings\StorageImpl::P_READING_TIME_STATUS = 'reading_time_status'
private

Definition at line 15 of file StorageImpl.php.


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