24 include_once(
"./Services/Table/interfaces/interface.ilTableFilterItem.php");
25 include_once(
"./Services/Form/classes/class.ilFormPropertyGUI.php");
82 $this->width = (int)$a_width;
104 $this->height = (int)$a_height;
125 $this->options = $a_options;
145 $this->value = $a_array;
155 return is_array($this->value) ? $this->value : array();
171 $this->select_all = (bool)$a_value;
176 $this->selected_first = (bool)$a_value;
203 $this->
setAlert($lng->txt(
"msg_input_is_required"));
217 $tpl =
new ilTemplate(
"tpl.prop_multi_select.html",
true,
true,
"Services/Form");
223 if($this->select_all)
226 $tpl->setCurrentBlock(
"item");
227 $tpl->setVariable(
"VAL",
"");
230 $tpl->setVariable(
"TXT_OPTION" ,
"<em>".$lng->txt(
"select_all").
"</em>");
232 $tpl->parseCurrentBlock();
235 $tpl->setVariable(
"TOGGLE_ALL_ID", $this->
getFieldId().
"_all__toggle");
239 if($this->selected_first)
242 $tmp_checked = $tmp_unchecked = array();
243 foreach(
$options as $option_value => $option_text)
245 if (in_array($option_value, $values))
247 $tmp_checked[$option_value] = $option_text;
251 $tmp_unchecked[$option_value] = $option_text;
254 $options = $tmp_checked + $tmp_unchecked;
256 unset($tmp_unchecked);
259 foreach(
$options as $option_value => $option_text)
261 $tpl->setCurrentBlock(
"item");
264 $tpl->setVariable(
"DISABLED",
265 " disabled=\"disabled\"");
267 if (in_array($option_value, $values))
269 $tpl->setVariable(
"CHECKED",
270 " checked=\"checked\"");
276 $tpl->setVariable(
"TXT_OPTION", $option_text);
278 $tpl->parseCurrentBlock();
304 $a_tpl->setCurrentBlock(
"prop_generic");
305 $a_tpl->setVariable(
"PROP_GENERIC", $this->
render());
306 $a_tpl->parseCurrentBlock();
339 $this->custom_attributes[] = $custom_attribute;