ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ()
 
 canHandle (Request $request)
 

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.

References ilCtrl\getLinkTargetByClass(), ilCtrl\setParameterByClass(), and ilCtrl\setTargetScript().

Referenced by handle(), and redirectWithGotoLink().

61  : string {
62  $ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class, 'skin_id', $skin_id);
63  $ctrl->setParameterByClass(
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  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
$ref_id
Definition: ltiauth.php:65
setTargetScript(string $a_target_script)
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:
+ 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.

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

37  : Response
38  {
39  return $response_factory->can(
40  $this->generateRedirectURL(
41  $context->ctrl(),
42  $request->getReferenceId()?->toInt() ?? 0,
43  $request->getAdditionalParameters()[0] ?? '',
44  $request->getAdditionalParameters()[1] ?? '',
45  $request->getAdditionalParameters()[2] ?? ''
46  )
47  );
48  }
+ 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.

References generateRedirectURL(), ILIAS\Repository\int(), and ilCtrl\redirectToURL().

86  : void
87  {
88  $ref_id = (int) $ref_id;
89  $node_id = $params[2] ?? '';
90  $skin_id = $params[3] ?? '';
91  $style_id = $params[4] ?? '';
92 
93  $ctrl->redirectToURL(
94  $this->generateRedirectURL(
95  $ctrl,
96  $ref_id,
97  $node_id,
98  $skin_id,
99  $style_id
100  )
101  );
102  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
$ref_id
Definition: ltiauth.php:65
redirectToURL(string $target_url)
+ Here is the call graph for this function:

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