ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilIntLinkRepItemExplorerGUI.php
Go to the documentation of this file.
1 <?php
2 
26 {
27  protected string $link_target_script;
28 
32  public function __construct(
33  $a_parent_obj,
34  string $a_parent_cmd
35  ) {
36  parent::__construct($a_parent_obj, $a_parent_cmd, null, "", "");
37 
38  // #14587 - ilRepositorySelectorExplorerGUI::__construct() does NOT include side blocks!
39  $list = $this->getTypeWhiteList();
40  $list[] = "poll";
41  $this->setTypeWhiteList($list);
42  }
43 
47  public function setSetLinkTargetScript(string $a_script): void
48  {
49  $this->link_target_script = $a_script;
50  }
51 
55  public function getSetLinkTargetScript(): string
56  {
58  }
59 
63  public function getNodeHref($a_node): string
64  {
65  if ($this->getSetLinkTargetScript() === "") {
66  return "#";
67  }
68 
70  $this->getSetLinkTargetScript(),
71  "linktype=RepositoryItem&linktarget=il__" . $a_node["type"] . "_" . $a_node["child"]
72  );
73 
74  return $link;
75  }
76 
81  public function getNodeOnClick($a_node): string
82  {
83  if ($this->getSetLinkTargetScript() === "") {
84  return "return il.IntLink.addInternalLink('[iln " . $a_node['type'] . "=&quot;" . $a_node['child'] . "&quot;]','[/iln]', event);";
85  }
86 
87  return "";
88  }
89 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
setTypeWhiteList(array $a_val)
Set type white list.
__construct( $a_parent_obj, string $a_parent_cmd)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setSetLinkTargetScript(string $a_script)
Set "set link target" script.
getNodeOnClick($a_node)
get onclick event handling
getSetLinkTargetScript()
Get "set link target" script.
__construct(Container $dic, ilPlugin $plugin)
getTypeWhiteList()
Get type white list.