ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilContainerSelectionExplorer.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2006 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
24include_once('./Services/UIComponent/Explorer/classes/class.ilExplorer.php');
25
36{
37 protected $target_type;
38
42 public function __construct($a_target)
43 {
44 global $tree;
45
46 parent::__construct($a_target);
47
48 $this->tree = $tree;
49 $this->root_id = $this->tree->readRootId();
50 $this->order_column = "title";
51
52 $this->setSessionExpandVariable("ref_repexpand");
53
54
55 $this->addFilter("root");
56 $this->addFilter("cat");
57 #$this->addFilter("grp");
58 #$this->addFilter("fold");
59 $this->addFilter("crs");
60
62 $this->setFiltered(true);
64
65 $this->checkPermissions(true);
66
67 }
68
74 public function setTargetType($a_type)
75 {
76 $this->target_type = $a_type;
77 }
78
84 public function getTargetType()
85 {
86 return $this->target_type;
87 }
88
94 public function isClickable($a_type,$a_id)
95 {
96 global $ilAccess;
97
98 if($this->getTargetType() == $a_type)
99 {
100 if($ilAccess->checkAccess('visible','',$a_id))
101 {
102 return true;
103 }
104 }
105 return FALSE;
106 }
107
114 public function isVisible($a_ref_id, $a_type)
115 {
116 global $ilAccess;
117
118 return $ilAccess->checkAccess('visible','',$a_ref_id);
119 }
120
128 function formatHeader($a_obj_id,$a_option)
129 {
130 global $lng, $ilias;
131
132 $tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
133
134 $tpl->setCurrentBlock("text");
135 $tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
136 $tpl->parseCurrentBlock();
137
138 /*
139 $tpl->setCurrentBlock("row");
140 $tpl->parseCurrentBlock();
141 */
142
143 $this->output[] = $tpl->get();
144 }
145
146}
147?>
global $tpl
Definition: ilias.php:8
const IL_FM_POSITIVE
isVisible($a_ref_id, $a_type)
Visible permission is sufficient.
isClickable($a_type, $a_id)
check if item is clickable
formatHeader($a_obj_id, $a_option)
overwritten method from base class @access public
Class ilExplorer class for explorer view in admin frame.
setSessionExpandVariable($a_var_name="expand")
set name of expand session variable
addFilter($a_item)
adds item to the filter @access public
setTitleLength($a_length)
Set max title length.
setFilterMode($a_mode=IL_FM_NEGATIVE)
set filter mode
checkPermissions($a_check)
check permissions via rbac
setFiltered($a_bool)
active/deactivate the filter @access public
const TITLE_LENGTH
max length of object title
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:40