ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
UserPreferenceStore.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore
;
22
23
use
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore
;
24
use
ilObjUser
;
25
26
final
class
UserPreferenceStore
implements
KeyValueStore
27
{
28
public
function
__construct
(
private
readonly
ilObjUser
$user)
29
{
30
}
31
32
public
function
value
(
string
$name): string
33
{
34
return
$this->
user
->getPref($name) ??
''
;
35
}
36
37
public
function
update
(
string
$name,
string
$value): void
38
{
39
$this->
user
->writePref($name, $value);
40
}
41
}
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore\UserPreferenceStore\update
update(string $name, string $value)
Definition:
UserPreferenceStore.php:37
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore\UserPreferenceStore\__construct
__construct(private readonly ilObjUser $user)
Definition:
UserPreferenceStore.php:28
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore
Definition:
ILIASSettingStore.php:21
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore
Definition:
KeyValueStore.php:23
ILIAS\Repository\user
user()
Definition:
trait.GlobalDICDomainServices.php:66
ilObjUser
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore\UserPreferenceStore
Definition:
UserPreferenceStore.php:26
ILIAS\LegalDocuments\ConsumerToolbox\KeyValueStore\UserPreferenceStore\value
value(string $name)
Definition:
UserPreferenceStore.php:32
components
ILIAS
LegalDocuments
classes
ConsumerToolbox
KeyValueStore
UserPreferenceStore.php
Generated on Sun Aug 31 2025 23:03:13 for ILIAS by
1.8.13 (using
Doxyfile
)