ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ILIAS\LegalDocuments\Provide\ProvideWithdrawal Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\Provide\ProvideWithdrawal:

Public Member Functions

 __construct (private readonly string $id, private readonly ilCtrl $ctrl, private readonly ilAuthSession $auth_session, ?Closure $logout_url=null, ?Closure $close_session_context=null)
 
 beginProcessURL ()
 
 finishAndLogout (array $additional_url_parameters=[])
 

Private Attributes

readonly Closure $close_session_context
 
readonly Closure $logout_url
 

Detailed Description

Definition at line 30 of file ProvideWithdrawal.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Provide\ProvideWithdrawal::__construct ( private readonly string  $id,
private readonly ilCtrl  $ctrl,
private readonly ilAuthSession  $auth_session,
?Closure  $logout_url = null,
?Closure  $close_session_context = null 
)
Parameters
null|Closure(array)string $logout_url
null|Closure(int)void $close_session_context

Definition at line 42 of file ProvideWithdrawal.php.

References ilStartUpGUI\logoutUrl(), and ilSession\setClosingContext().

48  {
49  $this->logout_url = $logout_url ?? ilStartUpGUI::logoutUrl(...);
50  $this->close_session_context = $close_session_context ?? ilSession::setClosingContext(...);
51  }
static logoutUrl(array $parameters=[])
Return the logout URL with a valid CSRF token.
static setClosingContext(int $a_context)
set closing context (for statistics)
+ Here is the call graph for this function:

Member Function Documentation

◆ beginProcessURL()

ILIAS\LegalDocuments\Provide\ProvideWithdrawal::beginProcessURL ( )

Definition at line 53 of file ProvideWithdrawal.php.

References $id.

53  : string
54  {
55  return ($this->logout_url)(['withdraw_consent' => $this->id]);
56  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ finishAndLogout()

ILIAS\LegalDocuments\Provide\ProvideWithdrawal::finishAndLogout ( array  $additional_url_parameters = [])
Parameters
array<string,string>$additional_url_parameters

Definition at line 61 of file ProvideWithdrawal.php.

References ILIAS\LegalDocuments\Provide\ProvideWithdrawal\$close_session_context, ILIAS\Repository\ctrl(), and ilSession\SESSION_CLOSE_USER.

Referenced by ILIAS\LegalDocuments\test\Provide\ProvideWithdrawalTest\testFinishAndLogout().

61  : void
62  {
64  $this->auth_session->logout();
65 
66  $this->ctrl->redirectToURL('login.php?' . http_build_query(array_merge($additional_url_parameters, [
67  'withdrawal_finished' => $this->id,
68  'cmd' => 'force_login',
69  ])));
70  }
const SESSION_CLOSE_USER
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $close_session_context

readonly Closure ILIAS\LegalDocuments\Provide\ProvideWithdrawal::$close_session_context
private

◆ $logout_url

readonly Closure ILIAS\LegalDocuments\Provide\ProvideWithdrawal::$logout_url
private

Definition at line 36 of file ProvideWithdrawal.php.


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