ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\User\StaticURLHandler Class Reference
+ Inheritance diagram for ILIAS\User\StaticURLHandler:
+ Collaboration diagram for ILIAS\User\StaticURLHandler:

Public Member Functions

 getNamespace ()
 
 handle (Request $request, Context $context, Factory $response_factory)
 
- Public Member Functions inherited from ILIAS\StaticURL\Handler\BaseHandler
 __construct ()
 
 canHandle (Request $request)
 
- Public Member Functions inherited from ILIAS\StaticURL\Handler\Handler
 __construct ()
 
 getNamespace ()
 
 canHandle (Request $request)
 
 handle (Request $request, Context $context, Factory $response_factory)
 

Data Fields

const NAMESPACE = 'user'
 
const CHANGE_EMAIL_OPERATIONS = 'email'
 

Private Member Functions

 buildChangeEmailUrl (string $token, \ilCtrl $ctrl)
 
 getLoginUrl (Request $request, Context $context)
 

Detailed Description

Definition at line 32 of file StaticURLHandler.php.

Member Function Documentation

◆ buildChangeEmailUrl()

ILIAS\User\StaticURLHandler::buildChangeEmailUrl ( string  $token,
\ilCtrl  $ctrl 
)
private

Definition at line 59 of file StaticURLHandler.php.

59 : string
60 {
61 $ctrl->setParameterByClass(PersonalProfileGUI::class, 'token', $token);
62 $link = $ctrl->getLinkTargetByClass([\ilDashboardGUI::class, PersonalProfileGUI::class], PersonalProfileGUI::CHANGE_EMAIL_CMD);
63 $ctrl->clearParameterByClass(PersonalProfileGUI::class, 'token');
64 return $link;
65 }
$token
Definition: xapitoken.php:70

References $token, ILIAS\User\Profile\PersonalProfileGUI\CHANGE_EMAIL_CMD, ilCtrl\clearParameterByClass(), ilCtrl\getLinkTargetByClass(), and ilCtrl\setParameterByClass().

Referenced by ILIAS\User\StaticURLHandler\handle().

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

◆ getLoginUrl()

ILIAS\User\StaticURLHandler::getLoginUrl ( Request  $request,
Context  $context 
)
private

Definition at line 67 of file StaticURLHandler.php.

70 : string {
71 $target = (new StandardURIBuilder(ILIAS_HTTP_PATH, false))->buildTarget(
72 $request->getNamespace(),
73 $request->getReferenceId(),
74 $request->getAdditionalParameters()
75 );
76
77 return '/login.php?target='
78 . str_replace('/', '_', rtrim($target, '/'))
79 . '&cmd=force_login&lang=' . $context->getUserLanguage();
80
81 }
$context
Definition: webdav.php:31

Referenced by ILIAS\User\StaticURLHandler\handle().

+ Here is the caller graph for this function:

◆ getNamespace()

ILIAS\User\StaticURLHandler::getNamespace ( )

Implements ILIAS\StaticURL\Handler\Handler.

Definition at line 37 of file StaticURLHandler.php.

37 : string
38 {
39 return self::NAMESPACE;
40 }

References ILIAS\User\StaticURLHandler\NAMESPACE.

◆ handle()

ILIAS\User\StaticURLHandler::handle ( Request  $request,
Context  $context,
Factory  $response_factory 
)

Implements ILIAS\StaticURL\Handler\Handler.

Definition at line 42 of file StaticURLHandler.php.

46 : Response {
47 $additional_params = $request->getAdditionalParameters();
48
49 $uri = match ($additional_params[0] ?? 'default') {
50 self::CHANGE_EMAIL_OPERATIONS => $context->isUserLoggedIn()
51 ? $this->buildChangeEmailUrl($additional_params[1], $context->ctrl())
52 : $this->getLoginUrl($request, $context),
53 default => $context->ctrl()->getLinkTargetByClass([\ilDashboardGUI::class], 'jumpToProfile'),
54 };
55
56 return $response_factory->can($uri);
57 }
buildChangeEmailUrl(string $token, \ilCtrl $ctrl)
getLoginUrl(Request $request, Context $context)
@ilCtrl_Calls ilDashboardGUI: ILIAS\User\Profile\PersonalProfileGUI @ilCtrl_Calls ilDashboardGUI: ilO...

References $context, ILIAS\User\StaticURLHandler\buildChangeEmailUrl(), and ILIAS\User\StaticURLHandler\getLoginUrl().

+ Here is the call graph for this function:

Field Documentation

◆ CHANGE_EMAIL_OPERATIONS

const ILIAS\User\StaticURLHandler::CHANGE_EMAIL_OPERATIONS = 'email'

Definition at line 35 of file StaticURLHandler.php.

◆ NAMESPACE

const ILIAS\User\StaticURLHandler::NAMESPACE = 'user'

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