ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
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 31 of file class.ilKSDocumentationGotoLink.php.

Member Function Documentation

◆ generateGotoLink()

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

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

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

◆ generateRedirectURL()

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

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

62 : string {
63 $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'skin_id', $skin_id);
65 ilSystemStyleDocumentationGUI::class,
66 'style_id',
67 $style_id
68 );
69 $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'node_id', $node_id);
70 $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'ref_id', $ref_id);
71
72 $cmd_classes = [
73 ilAdministrationGUI::class,
74 ilObjStyleSettingsGUI::class,
75 ilSystemStyleMainGUI::class,
76 ilSystemStyleDocumentationGUI::class
77 ];
78
79 $ctrl->setTargetScript('ilias.php');
80
81 return $ctrl->getLinkTargetByClass($cmd_classes, 'entries');
82 }
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 33 of file class.ilKSDocumentationGotoLink.php.

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

◆ handle()

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

Implements ILIAS\StaticURL\Handler\Handler.

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

38 : Response
39 {
40 return $response_factory->can(
42 $context->ctrl(),
43 $request->getReferenceId()?->toInt() ?? 0,
44 $request->getAdditionalParameters()[0] ?? '',
45 $request->getAdditionalParameters()[1] ?? '',
46 $request->getAdditionalParameters()[2] ?? ''
47 )
48 );
49 }
can(string $uri_path, bool $shift=false)
The Handler successfully resolved the target.
Definition: Factory.php:88

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 87 of file class.ilKSDocumentationGotoLink.php.

87 : void
88 {
90 $node_id = $params[2] ?? '';
91 $skin_id = $params[3] ?? '';
92 $style_id = $params[4] ?? '';
93
94 $ctrl->redirectToURL(
96 $ctrl,
97 $ref_id,
98 $node_id,
99 $skin_id,
100 $style_id
101 )
102 );
103 }
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: