ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_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.svg");
61 }
62 else
63 {
64 $icon = ilUtil::getImagePath("icon_".$a_node["type"].".svg");
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"]
setSkipRootNode($a_val)
Set skip root node.
Media pool explorer GUI class.
getNodeIcon($a_node)
Get node icon.
__construct($a_parent_obj, $a_parent_cmd, $a_media_pool)
Constructor.
getNodeContent($a_node)
Get node content.
getNodeHref($a_node)
Get href for node.
isNodeHighlighted($a_node)
Is node highlighted?
Explorer class that works on tree objects (Services/Tree)
setTypeWhiteList($a_val)
Set type white list.
getNodeId($a_node)
Get id for node.
setOrderField($a_val, $a_numeric=false)
Set order field.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15