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.ilNonEditableValueGUI.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
11
class
ilNonEditableValueGUI
extends
ilSubEnabledFormPropertyGUI
implements
ilTableFilterItem
12
{
13
protected
$type
;
14
protected
$value
;
15
protected
$title
;
16
protected
$info
;
17
protected
$section_icon
;
18
protected
$disable_escaping
;
19
25
function
__construct
($a_title =
""
, $a_id =
""
, $a_disable_escaping =
false
)
26
{
27
parent::__construct
($a_title, $a_id);
28
$this->
setTitle
($a_title);
29
$this->
setType
(
"non_editable_value"
);
30
$this->disable_escaping = (bool)$a_disable_escaping;
31
}
32
33
function
checkInput
()
34
{
35
$_POST
[$this->
getPostVar
()] =
ilUtil::stripSlashes
(
$_POST
[$this->
getPostVar
()]);
36
return
$this->
checkSubItemsInput
();
37
}
38
44
function
setType
($a_type)
45
{
46
$this->type = $a_type;
47
}
48
54
function
getType
()
55
{
56
return
$this->type
;
57
}
58
64
function
setTitle
($a_title)
65
{
66
$this->title = $a_title;
67
}
68
74
function
getTitle
()
75
{
76
return
$this->title
;
77
}
78
84
function
setInfo
($a_info)
85
{
86
$this->info = $a_info;
87
}
88
94
function
getInfo
()
95
{
96
return
$this->info
;
97
}
98
104
function
setValue
($a_value)
105
{
106
$this->value = $a_value;
107
}
108
114
function
getValue
()
115
{
116
return
$this->value
;
117
}
118
122
function
render
()
123
{
124
$tpl
=
new
ilTemplate
(
"tpl.non_editable_value.html"
,
true
,
true
,
"Services/Form"
);
125
if
($this->
getPostVar
() !=
""
)
126
{
127
$tpl
->setCurrentBlock(
"hidden"
);
128
$tpl
->setVariable(
'NON_EDITABLE_ID'
,$this->
getPostVar
());
129
$tpl
->setVariable(
"HVALUE"
,
ilUtil::prepareFormOutput
($this->
getValue
()));
130
$tpl
->parseCurrentBlock();
131
}
132
$value
= $this->
getValue
();
133
if
(!$this->disable_escaping)
134
{
135
$value
=
ilUtil::prepareFormOutput
(
$value
);
136
}
137
$tpl
->setVariable(
"VALUE"
,
$value
);
138
$tpl
->setVariable(
"ID"
, $this->
getFieldId
());
139
$tpl
->parseCurrentBlock();
140
141
return
$tpl
->get();
142
}
143
148
function
insert
(&$a_tpl)
149
{
150
$a_tpl->setCurrentBlock(
"prop_generic"
);
151
$a_tpl->setVariable(
"PROP_GENERIC"
, $this->
render
());
152
$a_tpl->parseCurrentBlock();
153
}
154
160
function
setValueByArray
($a_values)
161
{
162
if
(isset($a_values[$this->
getPostVar
()]))
163
{
164
$this->
setValue
($a_values[$this->
getPostVar
()]);
165
}
166
foreach
($this->
getSubItems
() as $item)
167
{
168
$item->setValueByArray($a_values);
169
}
170
}
171
175
function
getTableFilterHTML
()
176
{
177
$html = $this->
render
();
178
return
$html;
179
}
180
}
Services
Form
classes
class.ilNonEditableValueGUI.php
Generated on Sat Apr 30 2016 19:00:59 for ILIAS by
1.8.1.2 (using
Doxyfile
)