ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\ConsumerToolbox\Routing Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\ConsumerToolbox\Routing:

Public Member Functions

 __construct (private readonly ilCtrlInterface $ctrl, private readonly SelectSetting $session, private readonly Closure $redirect_to_starting_page, private readonly Closure $logout_url)
 
 ctrl ()
 
 logoutUrl ()
 
 redirectToOriginalTarget ()
 

Private Member Functions

 originalTarget ()
 

Detailed Description

Definition at line 26 of file Routing.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\ConsumerToolbox\Routing::__construct ( private readonly ilCtrlInterface  $ctrl,
private readonly SelectSetting  $session,
private readonly Closure  $redirect_to_starting_page,
private readonly Closure  $logout_url 
)
Parameters
Closure()void $redirect_to_starting_page
Closure()string $logout_url

Definition at line 32 of file Routing.php.

37 {
38 }

Member Function Documentation

◆ ctrl()

ILIAS\LegalDocuments\ConsumerToolbox\Routing::ctrl ( )

Definition at line 40 of file Routing.php.

41 {
42 return $this->ctrl;
43 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by ILIAS\LegalDocuments\ConsumerToolbox\Routing\redirectToOriginalTarget().

+ Here is the caller graph for this function:

◆ logoutUrl()

ILIAS\LegalDocuments\ConsumerToolbox\Routing::logoutUrl ( )

Definition at line 45 of file Routing.php.

45 : string
46 {
47 return ($this->logout_url)();
48 }

◆ originalTarget()

ILIAS\LegalDocuments\ConsumerToolbox\Routing::originalTarget ( )
private

Definition at line 62 of file Routing.php.

62 : Setting
63 {
64 return $this->session->typed('orig_request_target', fn(Marshal $m) => $m->nullable($m->string()));
65 }

References ILIAS\LegalDocuments\ConsumerToolbox\Marshal\nullable(), and ILIAS\LegalDocuments\ConsumerToolbox\Marshal\string().

Referenced by ILIAS\LegalDocuments\ConsumerToolbox\Routing\redirectToOriginalTarget().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectToOriginalTarget()

ILIAS\LegalDocuments\ConsumerToolbox\Routing::redirectToOriginalTarget ( )

Definition at line 50 of file Routing.php.

50 : 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 }

References ILIAS\LegalDocuments\ConsumerToolbox\Routing\ctrl(), and ILIAS\LegalDocuments\ConsumerToolbox\Routing\originalTarget().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: