ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
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 string P_READING_TIME_STATUS = 'reading_time_status'
 

Detailed Description

Definition at line 25 of file StorageImpl.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 29 of file StorageImpl.php.

30  {
31  }

Member Function Documentation

◆ getSettings()

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

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 33 of file StorageImpl.php.

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

◆ store()

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

Implements ILIAS\ContentPage\GlobalSettings\Storage.

Definition at line 46 of file StorageImpl.php.

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

46  : void
47  {
48  $this->globalSettings->set(self::P_READING_TIME_STATUS, ((string) (int) $settings->isReadingTimeEnabled()));
49  }
+ Here is the call graph for this function:

Field Documentation

◆ P_READING_TIME_STATUS

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

Definition at line 27 of file StorageImpl.php.


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