ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
Routing.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\LegalDocuments\ConsumerToolbox
;
22
23
use
ilCtrlInterface
;
24
use
Closure
;
25
26
class
Routing
27
{
32
public
function
__construct
(
33
private
readonly
ilCtrlInterface
$ctrl,
34
private
readonly
SelectSetting
$session,
35
private
readonly
Closure
$redirect_to_starting_page,
36
private
readonly
Closure
$logout_url
37
) {
38
}
39
40
public
function
ctrl
():
ilCtrlInterface
41
{
42
return
$this->ctrl;
43
}
44
45
public
function
logoutUrl
(): string
46
{
47
return
($this->logout_url)();
48
}
49
50
public
function
redirectToOriginalTarget
(): void
51
{
52
if
($this->
originalTarget
()->value() === null) {
53
($this->redirect_to_starting_page)();
54
return
;
55
}
56
57
$target = $this->
originalTarget
()->value();
58
$this->
originalTarget
()->update(null);
59
$this->
ctrl
()->redirectToURL($target);
60
}
61
62
private
function
originalTarget
():
Setting
63
{
64
return
$this->session->typed(
'orig_request_target'
, fn(
Marshal
$m) => $m->
nullable
($m->
string
()));
65
}
66
}
ILIAS\LegalDocuments\ConsumerToolbox\Routing\redirectToOriginalTarget
redirectToOriginalTarget()
Definition:
Routing.php:50
ILIAS\LegalDocuments\ConsumerToolbox\Routing\ctrl
ctrl()
Definition:
Routing.php:40
ILIAS\LegalDocuments\ConsumerToolbox\Routing
Definition:
Routing.php:26
Closure
ILIAS\LegalDocuments\ConsumerToolbox\Marshal\string
string()
Definition:
Marshal.php:75
ILIAS\LegalDocuments\ConsumerToolbox\Marshal
Definition:
Marshal.php:29
ILIAS\LegalDocuments\ConsumerToolbox\Marshal\nullable
nullable(Convert $convert)
Definition:
Marshal.php:60
ILIAS\LegalDocuments\ConsumerToolbox
Definition:
Blocks.php:21
ILIAS\LegalDocuments\ConsumerToolbox\Routing\logoutUrl
logoutUrl()
Definition:
Routing.php:45
ILIAS\LegalDocuments\ConsumerToolbox\Setting
A
Definition:
Setting.php:28
ILIAS\LegalDocuments\ConsumerToolbox\SelectSetting
Definition:
SelectSetting.php:25
ILIAS\LegalDocuments\ConsumerToolbox\Routing\originalTarget
originalTarget()
Definition:
Routing.php:62
ILIAS\LegalDocuments\ConsumerToolbox\Routing\__construct
__construct(private readonly ilCtrlInterface $ctrl, private readonly SelectSetting $session, private readonly Closure $redirect_to_starting_page, private readonly Closure $logout_url)
Definition:
Routing.php:32
ilCtrlInterface
components
ILIAS
LegalDocuments
classes
ConsumerToolbox
Routing.php
Generated on Wed Sep 10 2025 15:15:52 for ILIAS by
1.8.13 (using
Doxyfile
)