19declare(strict_types=1);
46 return $this->user_pref->typed(
'consent_withdrawal_requested', fn(
Marshal $m) => $m->
boolean());
60 fn() => $convert->
fromString()->transform($this->user->getAgreeDate()),
61 function ($value) use ($convert):
void {
62 $this->
user->setAgreeDate($convert->
toString()->transform($value));
63 $this->user->update();
70 $custom = $this->
refinery->custom()->transformation(...);
71 $null_or = fn($next) => $this->
refinery->byTrying([$this->
refinery->null(), $next]);
74 $null_or($this->
refinery->to()->dateTime()),
75 $null_or($custom(fn(DateTimeImmutable
$d):
string =>
$d->format(
'Y-m-d H:i:s')))
__construct(private readonly ilObjUser $user, private readonly SelectSetting $user_pref, private readonly Refinery $refinery)
setting(Convert $convert)