ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilKSDocumentationGotoLink Class Reference

Generatates and reads Goto Links. More...

+ Inheritance diagram for ilKSDocumentationGotoLink:
+ Collaboration diagram for ilKSDocumentationGotoLink:

Public Member Functions

 getNamespace ()
 
 handle (Request $request, Context $context, Factory $response_factory)
 
 generateGotoLink (string $node_id, string $skin_id, string $style_id)
 
 generateRedirectURL (ilCtrl $ctrl, int $ref_id, string $node_id, string $skin_id, string $style_id,)
 
 redirectWithGotoLink (string $ref_id, array $params, ilCtrl $ctrl)
 
- 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)
 

Detailed Description

Generatates and reads Goto Links.

Definition at line 30 of file class.ilKSDocumentationGotoLink.php.

Member Function Documentation

◆ generateGotoLink()

ilKSDocumentationGotoLink::generateGotoLink ( string  $node_id,
string  $skin_id,
string  $style_id 
)

Definition at line 50 of file class.ilKSDocumentationGotoLink.php.

50 : string
51 {
52 return implode('/', [$node_id, $skin_id, $style_id]);
53 }

◆ generateRedirectURL()

ilKSDocumentationGotoLink::generateRedirectURL ( ilCtrl  $ctrl,
int  $ref_id,
string  $node_id,
string  $skin_id,
string  $style_id 
)

Definition at line 55 of file class.ilKSDocumentationGotoLink.php.

61 : string {
62 $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'skin_id', $skin_id);
64 ilSystemStyleDocumentationGUI::class,
65 'style_id',
66 $style_id
67 );
68 $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'node_id', $node_id);
69 $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'ref_id', $ref_id);
70
71 $cmd_classes = [
72 ilAdministrationGUI::class,
73 ilObjStyleSettingsGUI::class,
74 ilSystemStyleMainGUI::class,
75 ilSystemStyleDocumentationGUI::class
76 ];
77
78 $ctrl->setTargetScript('ilias.php');
79
80 return $ctrl->getLinkTargetByClass($cmd_classes, 'entries');
81 }
setTargetScript(string $a_target_script)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
$ref_id
Definition: ltiauth.php:66

Referenced by handle().

+ Here is the caller graph for this function:

◆ getNamespace()

ilKSDocumentationGotoLink::getNamespace ( )

Implements ILIAS\StaticURL\Handler\Handler.

Definition at line 32 of file class.ilKSDocumentationGotoLink.php.

32 : string
33 {
34 return 'stys';
35 }

◆ handle()

ilKSDocumentationGotoLink::handle ( Request  $request,
Context  $context,
Factory  $response_factory 
)

Implements ILIAS\StaticURL\Handler\Handler.

Definition at line 37 of file class.ilKSDocumentationGotoLink.php.

37 : Response
38 {
39 return $response_factory->can(
41 $context->ctrl(),
42 $request->getReferenceId()?->toInt() ?? 0,
43 $request->getAdditionalParameters()[0] ?? '',
44 $request->getAdditionalParameters()[1] ?? '',
45 $request->getAdditionalParameters()[2] ?? ''
46 )
47 );
48 }

References ILIAS\StaticURL\Response\Factory\can(), ILIAS\StaticURL\Context\ctrl(), generateRedirectURL(), ILIAS\StaticURL\Request\Request\getAdditionalParameters(), and ILIAS\StaticURL\Request\Request\getReferenceId().

+ Here is the call graph for this function:

◆ redirectWithGotoLink()

ilKSDocumentationGotoLink::redirectWithGotoLink ( string  $ref_id,
array  $params,
ilCtrl  $ctrl 
)
Deprecated:
this is only present for backwards compatibility and the testcase.

Definition at line 86 of file class.ilKSDocumentationGotoLink.php.

86 : void
87 {
89 $node_id = $params[2] ?? '';
90 $skin_id = $params[3] ?? '';
91 $style_id = $params[4] ?? '';
92
93 $ctrl->redirectToURL(
95 $ctrl,
96 $ref_id,
97 $node_id,
98 $skin_id,
99 $style_id
100 )
101 );
102 }
redirectToURL(string $target_url)
@inheritDoc
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31

References $params, $ref_id, ILIAS\Repository\int(), and ilCtrl\redirectToURL().

+ Here is the call graph for this function:

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