ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilWebLinkItemInternal.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
26 {
27  public function isInternal(): bool
28  {
29  return true;
30  }
31 
32  public function getResolvedLink(bool $with_parameters = true): string
33  {
34  $parts = explode("|", $this->getTarget());
35  $type = (string) ($parts[0] ?? '');
36  $ref_id = (int) ($parts[1] ?? 0);
37 
38  switch ($type) {
39  case 'wpage':
40  $link = ilLink::_getStaticLink(
41  0,
42  'wiki',
43  true,
44  '&target=wiki_wpage_' . $ref_id
45  );
46  break;
47 
48  case 'term':
49  // #16894
50  $link = ilLink::_getStaticLink(
51  0,
52  "git",
53  true,
54  "&target=git_" . $ref_id
55  );
56  break;
57 
58  case 'page':
59  $type = "pg";
61  break;
62 
63  default:
65  }
66 
67  if (!$with_parameters) {
68  return $link;
69  }
70 
71  foreach ($this->getParameters() as $parameter) {
72  $link = $parameter->appendToLink($link);
73  }
74 
75  return $link;
76  }
77 }
$type
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
$ref_id
Definition: ltiauth.php:67
getResolvedLink(bool $with_parameters=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...