5 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
6 include_once(
"./Services/Form/classes/class.ilSubEnabledFormPropertyGUI.php");
7 include_once
'Services/UIComponent/Toolbar/interfaces/interface.ilToolbarItem.php';
8 include_once
'Services/Form/interfaces/interface.ilMultiValuesItem.php';
33 $this->lng = $DIC->language();
34 parent::__construct($a_title, $a_postvar);
45 $this->options = $a_options;
55 return $this->options ? $this->options : array();
65 if ($this->
getMulti() && is_array($a_value)) {
67 $a_value = array_shift($a_value);
69 $this->value = $a_value;
92 $item->setValueByArray($a_values);
137 $this->cust_attr[] = $a_attr;
150 $tpl =
new ilTemplate(
"tpl.prop_select.html",
true,
true,
"Services/Form");
153 $tpl->setCurrentBlock(
'cust_attr');
154 $tpl->setVariable(
'CUSTOM_ATTR', $attr);
155 $tpl->parseCurrentBlock();
161 foreach ($this->
getOptions() as $option_value => $option_text) {
163 $sel_value = $option_value;
166 if ((
string) $option_value == (
string) $this->
getValue()) {
167 $sel_value = $option_value;
170 foreach ($this->
getOptions() as $option_value => $option_text) {
171 $tpl->setCurrentBlock(
"prop_select_option");
173 if ((
string) $sel_value == (
string) $option_value) {
176 'selected="selected"' 179 $tpl->setVariable(
"TXT_SELECT_OPTION", $option_text);
180 $tpl->parseCurrentBlock();
194 foreach (
$value as $item) {
202 $tpl->setVariable(
"DISABLED",
" disabled=\"disabled\"");
203 $tpl->setVariable(
"HIDDEN_INPUT", $hidden);
211 $tpl->touchBlock(
"inline_in_bl");
227 $a_tpl->setCurrentBlock(
"prop_generic");
228 $a_tpl->setVariable(
"PROP_GENERIC", $this->
render());
229 $a_tpl->parseCurrentBlock();
259 $this->hide_sub = (bool) $a_value;
263 ' { il.Form.showSubForm(\'subform_' . $this->
getFieldId() .
'\', \
'il_prop_cont_' . $this->
getFieldId() .
'\'); }
' . 264 ' else { il.Form.hideSubForm(\
'subform_' . $this->
getFieldId() .
'\'); };
"'); 268 public function hideSubForm() 270 return (bool) $this->hide_sub;
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
Interface for property form input GUI classes that can be used in table filters.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Interface for multi values support.