ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilMaterialExplorer.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 /*
25 * Material Explorer for survey question pools
26 *
27 * @author Helmut Schottmüller <helmut.schottmueller@mac.com>
28 * @version $Id$
29 *
30 * @ingroup ModulesSurveyQuestionPool
31 */
32 
33 include_once("./Services/UIComponent/Explorer2/classes/class.ilTreeExplorerGUI.php");
34 
36 {
37  protected $current_type; // [string]
38 
39  function __construct($a_parent_obj, $a_parent_cmd, $a_selectable_type)
40  {
41  global $tree;
42 
43  parent::__construct("rep_exp", $a_parent_obj, $a_parent_cmd, $tree);
44 
45  $this->current_type = $a_selectable_type;
46 
47  $this->setTypeWhiteList(array("root", "cat", "grp", "fold", "crs", $this->current_type));
48  $this->setSkipRootNode(true);
49  $this->setAjax(true);
50  }
51 
52  function getNodeContent($a_node)
53  {
54  return $a_node["title"];
55  }
56 
57  function getNodeIcon($a_node)
58  {
59  $obj_id = ilObject::_lookupObjId($a_node["child"]);
60  return ilObject::_getIcon($obj_id, "tiny", $a_node["type"]);
61  }
62 
63  function getNodeHref($a_node)
64  {
65  global $ilCtrl;
66 
67  $ilCtrl->setParameter($this->parent_obj, 'source_id', $a_node["child"]);
68  return $ilCtrl->getLinkTarget($this->parent_obj, 'linkChilds');
69  }
70 
71  function isNodeClickable($a_node)
72  {
73  return ($a_node["type"] == $this->current_type);
74  }
75 }
76 
77 ?>
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
__construct($a_parent_obj, $a_parent_cmd, $a_selectable_type)
setSkipRootNode($a_val)
Set skip root node.
setTypeWhiteList($a_val)
Set type white list.
global $ilCtrl
Definition: ilias.php:18
static _lookupObjId($a_id)
Create styles array
The data for the language used.
Explorer class that works on tree objects (Services/Tree)