ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
UserSettings.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\DataProtection;
22
23use DateTimeImmutable;
24use ILIAS\LegalDocuments\ConsumerToolbox\UserSettings as UserSettingsInterface;
28
29class UserSettings implements UserSettingsInterface
30{
31 public function __construct(private readonly SelectSetting $user_pref)
32 {
33 }
34
38 public function withdrawalRequested(): Setting
39 {
40 return $this->user_pref->typed('dpro_withdrawal_requested', fn(Marshal $m) => $m->boolean());
41 }
42
46 public function agreeDate(): Setting
47 {
48 return $this->user_pref->typed('dpro_agree_date', fn(Marshal $m) => $m->nullable($m->dateTime()));
49 }
50}
__construct(private readonly SelectSetting $user_pref)