ILIAS
release_4-3 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
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
24
include_once(
'./Services/UIComponent/Explorer/classes/class.ilExplorer.php'
);
25
35
class
ilContainerSelectionExplorer
extends
ilExplorer
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
61
$this->
setFilterMode
(
IL_FM_POSITIVE
);
62
$this->
setFiltered
(
true
);
63
$this->
setTitleLength
(
ilObject::TITLE_LENGTH
);
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
?>
Services
ContainerReference
classes
class.ilContainerSelectionExplorer.php
Generated on Sat Apr 30 2016 19:00:54 for ILIAS by
1.8.1.2 (using
Doxyfile
)