ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\ContentPage\GlobalSettings\StorageImpl Class Reference
+ Inheritance diagram for ILIAS\ContentPage\GlobalSettings\StorageImpl:
+ Collaboration diagram for ILIAS\ContentPage\GlobalSettings\StorageImpl:

Public Member Functions

 __construct (private readonly ilSetting $globalSettings)
 
 getSettings ()
 
 store (Settings $settings)
 

Private Attributes

const P_READING_TIME_STATUS = 'reading_time_status'
 

Detailed Description

Definition at line 30 of file StorageImpl.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 34 of file StorageImpl.php.

35  {
36  }

Member Function Documentation

◆ getSettings()

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

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 38 of file StorageImpl.php.

References ILIAS\LTI\ToolProvider\$settings.

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

◆ store()

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

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 51 of file StorageImpl.php.

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

51  : void
52  {
53  $this->globalSettings->set(self::P_READING_TIME_STATUS, ((string) (int) $settings->isReadingTimeEnabled()));
54  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
+ Here is the call graph for this function:

Field Documentation

◆ 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: