24 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
25 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
78 $this->width = (int)$a_width;
100 $this->height = (int)$a_height;
121 $this->options = $a_options;
141 $this->value = $a_array;
151 return is_array($this->value) ? $this->value : array();
167 $this->select_all = (bool)$a_value;
172 $this->selected_first = (bool)$a_value;
199 $this->
setAlert($lng->txt(
"msg_input_is_required"));
213 $tpl =
new ilTemplate(
"tpl.prop_multi_select.html",
true,
true,
"Services/Form");
219 if($this->select_all)
222 $tpl->setCurrentBlock(
"item");
223 $tpl->setVariable(
"VAL",
"");
226 $tpl->setVariable(
"TXT_OPTION" ,
"<em>".$lng->txt(
"select_all").
"</em>");
228 $tpl->parseCurrentBlock();
231 $tpl->setVariable(
"TOGGLE_ALL_ID", $this->
getFieldId().
"_all__toggle");
235 if($this->selected_first)
238 $tmp_checked = $tmp_unchecked = array();
239 foreach(
$options as $option_value => $option_text)
241 if (in_array($option_value, $values))
243 $tmp_checked[$option_value] = $option_text;
247 $tmp_unchecked[$option_value] = $option_text;
250 $options = $tmp_checked + $tmp_unchecked;
252 unset($tmp_unchecked);
255 foreach(
$options as $option_value => $option_text)
257 $tpl->setCurrentBlock(
"item");
260 $tpl->setVariable(
"DISABLED",
261 " disabled=\"disabled\"");
263 if (in_array($option_value, $values))
265 $tpl->setVariable(
"CHECKED",
266 " checked=\"checked\"");
272 $tpl->setVariable(
"TXT_OPTION", $option_text);
274 $tpl->parseCurrentBlock();
293 $a_tpl->setCurrentBlock(
"prop_generic");
294 $a_tpl->setVariable(
"PROP_GENERIC", $this->
render());
295 $a_tpl->parseCurrentBlock();