Class ilTermsOfServiceWithdrawalGUIHelper.
More...
◆ __construct()
ilTermsOfServiceWithdrawalGUIHelper::__construct |
( |
ilObjUser |
$subjectUser | ) |
|
◆ getConsentWithdrawalConfirmation()
ilTermsOfServiceWithdrawalGUIHelper::getConsentWithdrawalConfirmation |
( |
object |
$parentObject | ) |
|
- Parameters
-
- Returns
- string
Definition at line 170 of file class.ilTermsOfServiceWithdrawalGUIHelper.php.
References $message, AUTH_LDAP, AUTH_LOCAL, and user().
173 if ($this->setting->get(
'auth_mode')) {
174 $defaultAuth = $this->setting->get(
'auth_mode');
179 ($this->
user->getAuthMode() ===
'default' && $defaultAuth ==
AUTH_LDAP)
183 if (!$this->
user->getAgreeDate()) {
184 $lng_suffix =
'_no_consent_yet';
186 $question = $this->lng->txt(
'withdrawal_sure_account' . $lng_suffix);
187 if (!$isLdapUser && (
bool) $this->setting->get(
'tos_withdrawal_usr_deletion',
false)) {
188 $question = $this->lng->txt(
'withdrawal_sure_account_deletion' . $lng_suffix);
191 $confirmation = $this->uiFactory->messageBox()->confirmation($question)->withButtons([
192 $this->uiFactory->button()->standard(
193 $this->lng->txt(
'confirm'),
194 $this->ctrl->getFormAction($parentObject,
'withdrawAcceptance')
196 $this->uiFactory->button()->standard(
197 $this->lng->txt(
'cancel'),
198 $this->ctrl->getFormAction($parentObject,
'cancelWithdrawal')
203 $message = nl2br(str_ireplace(
"[BR]",
"\n", sprintf(
204 $this->lng->txt(
'withdrawal_mail_info') . $this->lng->txt(
'withdrawal_mail_text'),
205 $this->
user->getFullname(),
206 $this->
user->getLogin(),
207 $this->
user->getExternalAccount()
210 $panelContent = $this->uiFactory->legacy(
211 $this->uiRenderer->render([
213 $this->uiFactory->divider()->horizontal(),
218 $content = $this->uiRenderer->render(
219 $this->uiFactory->panel()->standard($this->lng->txt(
'withdraw_usr_agreement'), $panelContent)
222 $content = $this->uiRenderer->render($confirmation);
◆ getWithdrawalSectionForModal()
ilTermsOfServiceWithdrawalGUIHelper::getWithdrawalSectionForModal |
( |
| ) |
|
|
private |
- Returns
- ilTemplate
Definition at line 53 of file class.ilTermsOfServiceWithdrawalGUIHelper.php.
Referenced by modifyFooter().
55 $template =
new ilTemplate(
'tpl.tos_withdrawal_section.html',
true,
true,
'Services/TermsOfService');
56 $template->setVariable(
'TXT_TOS_WITHDRAWAL_HEADLINE', $this->lng->txt(
'withdraw_consent_header'));
57 $template->setVariable(
'TXT_TOS_WITHDRAWAL', $this->lng->txt(
'withdraw_consent_description'));
58 $template->setVariable(
60 $this->uiRenderer->render(
61 $this->uiFactory->button()->standard($this->lng->txt(
'withdraw_consent'),
'logout.php?withdraw_consent')
◆ getWithdrawalTextForLogoutScreen()
ilTermsOfServiceWithdrawalGUIHelper::getWithdrawalTextForLogoutScreen |
( |
RequestInterface |
$httpRequest | ) |
|
- Parameters
-
RequestInterface | $httpRequest | |
- Returns
- string
Definition at line 148 of file class.ilTermsOfServiceWithdrawalGUIHelper.php.
150 $withdrawalStatus = ($httpRequest->getQueryParams()[
'withdrawal_relogin_content'] ?? 0);
153 if ($withdrawalStatus !== 0) {
154 $text = $this->uiRenderer->render($this->uiFactory->divider()->horizontal());
155 if ($withdrawalStatus ===
'internal') {
156 $text .= $this->lng->txt(
'withdraw_consent_description_internal');
158 $text .= $this->lng->txt(
'withdraw_consent_description_external');
◆ handleWithdrawalLogoutRequest()
ilTermsOfServiceWithdrawalGUIHelper::handleWithdrawalLogoutRequest |
( |
RequestInterface |
$httpRequest, |
|
|
object |
$guiClass |
|
) |
| |
- Parameters
-
RequestInterface | $httpRequest | |
object | $guiClass | |
Definition at line 108 of file class.ilTermsOfServiceWithdrawalGUIHelper.php.
References AUTH_ECS, AUTH_LOCAL, AUTH_PROVIDER_LTI, and user().
112 if (!isset($httpRequest->getQueryParams()[
'withdraw_consent'])) {
116 if (!$this->tosHelper->isGloballyEnabled() || !$this->tosHelper->isIncludedUser($this->
user)) {
121 if ($this->setting->get(
'auth_mode')) {
122 $defaultAuth = $this->setting->get(
'auth_mode');
130 ($this->
user->getAuthMode() ===
'default' && $defaultAuth ==
AUTH_ECS)
135 $this->
user->writePref(
'consent_withdrawal_requested', 1);
138 $this->ctrl->setParameter($guiClass,
'withdrawal_relogin_content',
'external');
140 $this->ctrl->setParameter($guiClass,
'withdrawal_relogin_content',
'internal');
◆ modifyFooter()
ilTermsOfServiceWithdrawalGUIHelper::modifyFooter |
( |
Footer |
$footer | ) |
|
- Parameters
-
- Returns
- Footer
- Exceptions
-
Definition at line 73 of file class.ilTermsOfServiceWithdrawalGUIHelper.php.
References getWithdrawalSectionForModal(), user(), and ILIAS\UI\Component\MainControls\Footer\withAdditionalModalAndTrigger().
76 $this->tosHelper->isGloballyEnabled() &&
77 $this->tosHelper->isIncludedUser($this->
user) &&
78 $this->
user->getAgreeDate()
80 $entity = $this->tosHelper->getCurrentAcceptanceForUser($this->
user);
81 if ($entity->getId()) {
83 $this->uiFactory->modal()->roundtrip(
86 $this->uiFactory->legacy($this->lng->txt(
'usr_agreement_footer_intro')),
87 $this->uiFactory->divider()->horizontal(),
88 $this->uiFactory->legacy(
96 $this->uiFactory->button()->shy($this->lng->txt(
'usr_agreement'),
'#')
getWithdrawalSectionForModal()
withAdditionalModalAndTrigger(Modal\RoundTrip $roundTripModal, Button\Shy $shyButton)
This describes the Footer.
◆ setWithdrawalInfoForLoginScreen()
ilTermsOfServiceWithdrawalGUIHelper::setWithdrawalInfoForLoginScreen |
( |
RequestInterface |
$httpRequest | ) |
|
- Parameters
-
RequestInterface | $httpRequest | |
Definition at line 231 of file class.ilTermsOfServiceWithdrawalGUIHelper.php.
References ilUtil\sendInfo().
233 if (isset($httpRequest->getQueryParams()[
'tos_withdrawal_type'])) {
234 $withdrawalType = (int) $httpRequest->getQueryParams()[
'tos_withdrawal_type'];
235 if (1 === $withdrawalType) {
237 } elseif (2 === $withdrawalType) {
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
◆ $ctrl
ilTermsOfServiceWithdrawalGUIHelper::$ctrl |
|
protected |
◆ $lng
ilTermsOfServiceWithdrawalGUIHelper::$lng |
|
protected |
◆ $setting
ilTermsOfServiceWithdrawalGUIHelper::$setting |
|
protected |
◆ $tosHelper
ilTermsOfServiceWithdrawalGUIHelper::$tosHelper |
|
protected |
◆ $tpl
ilTermsOfServiceWithdrawalGUIHelper::$tpl |
|
protected |
◆ $uiFactory
ilTermsOfServiceWithdrawalGUIHelper::$uiFactory |
|
protected |
◆ $uiRenderer
ilTermsOfServiceWithdrawalGUIHelper::$uiRenderer |
|
protected |
◆ $user
ilTermsOfServiceWithdrawalGUIHelper::$user |
|
protected |
The documentation for this class was generated from the following file: