19 declare(strict_types=1);
42 private readonly
UI $ui,
43 private readonly
User $user,
44 private readonly
Provide $legal_documents,
45 private readonly
Closure $render,
46 private readonly
Closure $create_template,
47 private readonly ?
Closure $goto_link,
53 return $this->
user->acceptedVersion()->map(
57 !$this->goto_link || $this->
user->isLoggedIn() ?
59 $this->
footer($footer, ($this->goto_link)())
66 return $this->
ui->create()->modal()->roundtrip($content->
title(), [
67 $this->
ui->create()->legacy()->content($this->
ui->txt(
'usr_agreement_footer_intro')),
68 $this->
ui->create()->divider()->horizontal(),
69 $this->legal_documents->document()->contentAsComponent($content),
70 $this->
ui->create()->divider()->horizontal(),
77 $template = ($this->create_template)(
'withdrawal-section.html');
78 $template->setVariable(
'TXT_WITHDRAWAL_HEADLINE', $this->
ui->txt(
'withdraw_consent_header'));
79 $template->setVariable(
'TXT_WITHDRAWAL', $this->
ui->txt(
'withdraw_consent_description'));
80 $template->setVariable(
83 $this->
ui->create()->button()->standard($this->
ui->txt(
'withdraw_consent'), $this->legal_documents->withdrawal()->beginProcessURL())
87 return $this->
ui->create()->legacy()->content($template->get());
95 return $footer($this->legal_documents->id(), $this->
ui->txt(
'usr_agreement'), $value);
This describes commonalities between the different modals.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A result encapsulates a value or an error and simplifies the handling of those.