ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ 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\Settings
Definition:
Settings.php:29
ILIAS\ContentPage\GlobalSettings\Settings\isReadingTimeEnabled
isReadingTimeEnabled()
Definition:
Settings.php:32
ILIAS\ContentPage\GlobalSettings\StorageImpl
Definition:
StorageImpl.php:26
ILIAS\ContentPage\GlobalSettings\StorageImpl\P_READING_TIME_STATUS
const string P_READING_TIME_STATUS
Definition:
StorageImpl.php:27
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\StorageImpl\store
store(Settings $settings)
Definition:
StorageImpl.php:46
ilSetting
ILIAS Setting Class.
Definition:
class.ilSetting.php:27
ILIAS\ContentPage\GlobalSettings\Storage
Definition:
Storage.php:29
ILIAS\ContentPage\GlobalSettings
Definition:
Settings.php:21
components
ILIAS
ContentPage
classes
GlobalSettings
StorageImpl.php
Generated on Sat Oct 18 2025 23:02:50 for ILIAS by
1.9.4 (using
Doxyfile
)