ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ ilDoc Overview
StorageImpl.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\ContentPage\GlobalSettings
;
22
23
use
ilSetting
;
24
25
class
StorageImpl
implements
Storage
26
{
27
private
const
string
P_READING_TIME_STATUS
=
'reading_time_status'
;
28
29
public
function
__construct
(
private
readonly
ilSetting
$globalSettings)
30
{
31
}
32
33
public
function
getSettings
():
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
}
45
46
public
function
store
(
Settings
$settings): void
47
{
48
$this->globalSettings->set(self::P_READING_TIME_STATUS, ((
string
) (
int
) $settings->
isReadingTimeEnabled
()));
49
}
50
}
ILIAS\ContentPage\GlobalSettings\StorageImpl\getSettings
getSettings()
Definition:
StorageImpl.php:33
ILIAS\ContentPage\GlobalSettings\StorageImpl\__construct
__construct(private readonly ilSetting $globalSettings)
Definition:
StorageImpl.php:29
ILIAS\ContentPage\GlobalSettings\Storage
Definition:
Storage.php:28
ILIAS\ContentPage\GlobalSettings\Settings\isReadingTimeEnabled
isReadingTimeEnabled()
Definition:
Settings.php:32
ILIAS\ContentPage\GlobalSettings\StorageImpl
Definition:
StorageImpl.php:25
ILIAS\ContentPage\GlobalSettings
Definition:
Settings.php:21
ILIAS\ContentPage\GlobalSettings\StorageImpl\store
store(Settings $settings)
Definition:
StorageImpl.php:46
SettingsInterface
ilSetting
ILIAS\ContentPage\GlobalSettings\StorageImpl\P_READING_TIME_STATUS
const string P_READING_TIME_STATUS
Definition:
StorageImpl.php:27
components
ILIAS
ContentPage
classes
GlobalSettings
StorageImpl.php
Generated on Mon Sep 1 2025 23:02:46 for ILIAS by
1.8.13 (using
Doxyfile
)