ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
StorageImpl.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
namespace
ILIAS\ContentPage\GlobalSettings
;
5
6
use
ilSetting
;
7
13
class
StorageImpl
implements
Storage
14
{
15
private
const
P_READING_TIME_STATUS
=
'reading_time_status'
;
16
18
private
$globalSettings
;
19
24
public
function
__construct
(
ilSetting
$globalSettings
)
25
{
26
$this->globalSettings =
$globalSettings
;
27
}
28
32
public
function
getSettings
() :
Settings
33
{
34
$settings =
new
Settings
();
35
36
if
($this->globalSettings->get(self::P_READING_TIME_STATUS,
false
)) {
37
$settings = $settings->withEnabledReadingTime();
38
}
else
{
39
$settings = $settings->withDisabledReadingTime();
40
}
41
42
return
$settings;
43
}
44
48
public
function
store
(
Settings
$settings) : void
49
{
50
$this->globalSettings->set(self::P_READING_TIME_STATUS, ((
string
) (
int
) $settings->
isReadingTimeEnabled
()));
51
}
52
}
ILIAS\ContentPage\GlobalSettings\StorageImpl\getSettings
getSettings()
Definition:
StorageImpl.php:32
ILIAS\ContentPage\GlobalSettings\StorageImpl\__construct
__construct(ilSetting $globalSettings)
StorageImpl constructor.
Definition:
StorageImpl.php:24
ILIAS\ContentPage\GlobalSettings\StorageImpl\$globalSettings
$globalSettings
Definition:
StorageImpl.php:18
ILIAS\ContentPage\GlobalSettings\StorageImpl\P_READING_TIME_STATUS
const P_READING_TIME_STATUS
Definition:
StorageImpl.php:15
ILIAS\ContentPage\GlobalSettings\Storage
Definition:
Storage.php:11
ILIAS\ContentPage\GlobalSettings\Settings\isReadingTimeEnabled
isReadingTimeEnabled()
Definition:
Settings.php:19
ILIAS\ContentPage\GlobalSettings\StorageImpl
Definition:
StorageImpl.php:13
ILIAS\ContentPage\GlobalSettings\Settings
Definition:
Settings.php:11
ILIAS\ContentPage\GlobalSettings
Definition:
Settings.php:4
ILIAS\ContentPage\GlobalSettings\StorageImpl\store
store(Settings $settings)
Definition:
StorageImpl.php:48
ilSetting
Modules
ContentPage
classes
GlobalSettings
StorageImpl.php
Generated on Wed Sep 3 2025 21:00:53 for ILIAS by
1.8.13 (using
Doxyfile
)