ILIAS  release_8 Revision v8.24
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)
 
 getSettings ()
 
 store (Settings $settings)
 
 getSettings ()
 
 store (Settings $settings)
 

Private Attributes

const P_READING_TIME_STATUS = 'reading_time_status'
 
ilSetting $globalSettings
 

Detailed Description

Definition at line 30 of file StorageImpl.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 36 of file StorageImpl.php.

37 {
38 $this->globalSettings = $globalSettings;
39 }

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

Member Function Documentation

◆ getSettings()

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

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 41 of file StorageImpl.php.

41 : Settings
42 {
43 $settings = new Settings();
44
45 if ($this->globalSettings->get(self::P_READING_TIME_STATUS, '0')) {
46 $settings = $settings->withEnabledReadingTime();
47 } else {
48 $settings = $settings->withDisabledReadingTime();
49 }
50
51 return $settings;
52 }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200

References ILIAS\LTI\ToolProvider\$settings.

◆ store()

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

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 54 of file StorageImpl.php.

54 : void
55 {
56 $this->globalSettings->set(self::P_READING_TIME_STATUS, ((string) (int) $settings->isReadingTimeEnabled()));
57 }

References ILIAS\LTI\ToolProvider\$settings.

Field Documentation

◆ $globalSettings

ilSetting 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 32 of file StorageImpl.php.


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