ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilBookmarkBlockExplorerGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Bookmarks/classes/class.ilBookmarkExplorerGUI.php");
5 
17 {
21  protected $user;
22 
26  protected $ctrl;
27 
31  public function __construct($a_parent_obj, $a_parent_cmd, $a_user_id = 0)
32  {
33  global $DIC;
34 
35  $this->user = $DIC->user();
36  $this->ctrl = $DIC->ctrl();
37  $ilUser = $DIC->user();
38 
39  parent::__construct($a_parent_obj, $a_parent_cmd, $a_user_id);
40 
41  $this->setTypeWhiteList(array("bmf", "dum", "bm"));
42  $this->setOrderField("type DESC, title");
43  $this->setSkipRootNode(true);
44  }
45 
52  public function isNodeHighlighted($a_node)
53  {
54  return false;
55  }
56 
63  public function getNodeHref($a_node)
64  {
66 
67  switch ($a_node["type"]) {
68  // bookmark folder
69  case "bmf":
70  return "#";
71  break;
72 
73  // bookmark
74  case "bm":
75  return $a_node["target"];
76  break;
77  }
78  }
79 
86  public function getNodeTarget($a_node)
87  {
88  if ($a_node["type"] == "bm") {
89  return "_blank";
90  }
91  return "";
92  }
93 
100  public function getNodeOnClick($a_node)
101  {
102  if ($a_node["type"] == "bmf") {
103  return $this->getNodeToggleOnClick($a_node);
104  }
105  return "";
106  }
107 }
global $DIC
Definition: saml.php:7
getNodeTarget($a_node)
Get target for node.
setSkipRootNode($a_val)
Set skip root node.
getNodeToggleOnClick($a_node)
Get onclick attribute for node toggling.
user()
Definition: user.php:4
__construct($a_parent_obj, $a_parent_cmd, $a_user_id=0)
Constructor.
Bookmark block explorer GUI class.
Bookmark explorer GUI class.
setTypeWhiteList($a_val)
Set type white list.
global $ilCtrl
Definition: ilias.php:18
isNodeHighlighted($a_node)
Is node highlighted?
$ilUser
Definition: imgupload.php:18
getNodeOnClick($a_node)
Get onclick for node.
setOrderField($a_val, $a_numeric=false)
Set order field.