ILIAS  release_4-4 Revision
class.ilMediaPoolExplorerGUI.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/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
5 
15 {
19  public function __construct($a_parent_obj, $a_parent_cmd, $a_media_pool)
20  {
21  global $ilUser;
22 
23  $this->media_pool = $a_media_pool;
24  parent::__construct("mep_exp", $a_parent_obj, $a_parent_cmd, $a_media_pool->getTree());
25 
26  $this->setTypeWhiteList(array("dummy", "fold"));
27  $this->setSkipRootNode(false);
28  $this->setAjax(true);
29  $this->setOrderField("title");
30  }
31 
38  function getNodeContent($a_node)
39  {
40  global $lng;
41 
42  if ($a_node["child"] == $this->getNodeId($this->getRootNode()))
43  {
44  return $this->media_pool->getTitle();
45  }
46 
47  return $a_node["title"];
48  }
49 
56  function getNodeIcon($a_node)
57  {
58  if ($a_node["child"] == $this->getNodeId($this->getRootNode()))
59  {
60  $icon = ilUtil::getImagePath("icon_mep_s.png");
61  }
62  else
63  {
64  $icon = ilUtil::getImagePath("icon_".$a_node["type"]."_s.png");
65  }
66 
67  return $icon;
68  }
69 
76  function isNodeHighlighted($a_node)
77  {
78  if ($a_node["child"] == $_GET["mepitem_id"] ||
79  ($_GET["mepitem_id"] == "" && $a_node["child"] == $this->getNodeId($this->getRootNode())))
80  {
81  return true;
82  }
83  return false;
84  }
85 
92  function getNodeHref($a_node)
93  {
94  global $ilCtrl;
95 
96  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $a_node["child"]);
97  $ret = $ilCtrl->getLinkTargetByClass("ilobjmediapoolgui", "listMedia");
98  $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $_GET["mepitem_id"]);
99  return $ret;
100  }
101 
102 }
103 
104 ?>
$_GET["client_id"]
getNodeIcon($a_node)
Get node icon.
setSkipRootNode($a_val)
Set skip root node.
Media pool explorer GUI class.
setTypeWhiteList($a_val)
Set type white list.
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getNodeHref($a_node)
Get href for node.
getNodeId($a_node)
Get id for node.
getRootNode()
Get root node.
global $ilUser
Definition: imgupload.php:15
Explorer class that works on tree objects (Services/Tree)
global $lng
Definition: privfeed.php:40
setOrderField($a_val, $a_numeric=false)
Set order field.
isNodeHighlighted($a_node)
Is node highlighted?
__construct($a_parent_obj, $a_parent_cmd, $a_media_pool)
Constructor.
getNodeContent($a_node)
Get node content.