ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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{
19 protected $ctrl;
20
24 protected $user;
25
29 protected $access;
30
37 public function __construct($a_target, $a_par_class = "")
38 {
39 global $DIC;
40
41 $this->tree = $DIC->repositoryTree();
42 $this->user = $DIC->user();
43 $this->access = $DIC->access();
44 $this->lng = $DIC->language();
45 $tree = $DIC->repositoryTree();
46 $ilCtrl = $DIC->ctrl();
47
48 $this->ctrl = $ilCtrl;
49 $this->parent_class = $a_par_class;
50 parent::__construct($a_target);
51 }
52
53 public function setSelectableTypes($a_types)
54 {
55 $this->selectable_types = $a_types;
56 }
57
58 public function setRefId($a_ref_id)
59 {
60 $this->ref_id = $a_ref_id;
61 }
62
63 public function buildLinkTarget($a_node_id, $a_type)
64 {
66
67 //$ilCtrl->setParameterByClass($this->parent_class, "subCmd", "selectGlossary");
68 $ilCtrl->setParameterByClass($this->parent_class, "glo_ref_id", $a_node_id);
69 $link = $ilCtrl->getLinkTargetByClass($this->parent_class, "selectGlossary");
70
71 return $link;
72 }
73
74
78 public function isClickable($a_type, $a_ref_id = 0)
79 {
81 $ilAccess = $this->access;
82
83 if ($a_type == "glo" &&
84 $ilAccess->checkAccess("read", "", $a_ref_id)) {
85 return true;
86 }
87 return false;
88 }
89
93 public function showChilds($a_ref_id)
94 {
95 $ilAccess = $this->access;
96
97 if ($a_ref_id == 0) {
98 return true;
99 }
100
101 if ($ilAccess->checkAccess("read", "", $a_ref_id)) {
102 return true;
103 } else {
104 return false;
105 }
106 }
107
108
116 public function formatHeader($tpl, $a_obj_id, $a_option)
117 {
119
120 $tpl->setCurrentBlock("icon");
121 $tpl->setVariable("ICON_IMAGE", ilUtil::getImagePath("icon_root.svg"));
122 $tpl->setVariable("TXT_ALT_IMG", $lng->txt("repository"));
123 $tpl->parseCurrentBlock();
124
125 $tpl->setCurrentBlock("text");
126 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
127 $tpl->parseCurrentBlock();
128
129 //$tpl->setCurrentBlock("row");
130 //$tpl->parseCurrentBlock();
131
132 $tpl->touchBlock("element");
133 }
134} // END class ilFileSelectorGUI
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
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=0)
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
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$ilUser
Definition: imgupload.php:18
$a_type
Definition: workflow.php:92
$DIC
Definition: xapitoken.php:46