ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilGlossarySelectorGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/UIComponent/Explorer/classes/class.ilExplorer.php");
5
15{
22 function __construct($a_target, $a_par_class = "")
23 {
24 global $tree,$ilCtrl;
25
26 $this->ctrl =& $ilCtrl;
27 $this->parent_class = $a_par_class;
28 parent::ilExplorer($a_target);
29 }
30
31 function setSelectableTypes($a_types)
32 {
33 $this->selectable_types = $a_types;
34 }
35
36 function setRefId($a_ref_id)
37 {
38 $this->ref_id = $a_ref_id;
39 }
40
41 function buildLinkTarget($a_node_id, $a_type)
42 {
43 global $ilCtrl;
44
45 //$ilCtrl->setParameterByClass($this->parent_class, "subCmd", "selectGlossary");
46 $ilCtrl->setParameterByClass($this->parent_class, "glo_ref_id", $a_node_id);
47 $link = $ilCtrl->getLinkTargetByClass($this->parent_class, "selectGlossary");
48
49 return $link;
50 }
51
52
56 function isClickable($a_type, $a_ref_id)
57 {
58 global $ilUser, $ilAccess;
59
60 if ($a_type == "glo" &&
61 $ilAccess->checkAccess("read", "", $a_ref_id))
62 {
63 return true;
64 }
65 false;
66 }
67
71 function showChilds($a_ref_id)
72 {
73 global $ilAccess;
74
75 if ($a_ref_id == 0)
76 {
77 return true;
78 }
79
80 if ($ilAccess->checkAccess("read", "", $a_ref_id))
81 {
82 return true;
83 }
84 else
85 {
86 return false;
87 }
88 }
89
90
98 function formatHeader(&$tpl, $a_obj_id,$a_option)
99 {
100 global $lng, $ilias;
101
102 $tpl->setCurrentBlock("icon");
103 $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_root.svg"));
104 $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
105 $tpl->parseCurrentBlock();
106
107 $tpl->setCurrentBlock("text");
108 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
109 $tpl->parseCurrentBlock();
110
111 //$tpl->setCurrentBlock("row");
112 //$tpl->parseCurrentBlock();
113
114 $tpl->touchBlock("element");
115
116 }
117} // END class ilFileSelectorGUI
118?>
global $tpl
Definition: ilias.php:8
Class ilExplorer class for explorer view in admin frame.
Select file for being added into file lists.
buildLinkTarget($a_node_id, $a_type)
get link target (may be overwritten by derived classes)
showChilds($a_ref_id)
Show childs y/n?
formatHeader(&$tpl, $a_obj_id, $a_option)
overwritten method from base class @access public
isClickable($a_type, $a_ref_id)
Item clickable?
__construct($a_target, $a_par_class="")
Constructor @access public.
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