49 $this->items[$id] = $item;
52 $this->labels[$id] = $label;
64 if(isset($this->items[$id]))
66 return $this->items[$id];
77 if(isset($this->items[$id]))
79 unset($this->items[$id]);
92 foreach($this->items as $id => $obj)
94 if(method_exists($obj, $method))
96 $result[$id] = call_user_func_array(array($obj, $method), $param);
108 foreach($this->items as $id => $obj)
110 $result[$id] = $obj->serializeData();
120 $data = unserialize($a_data);
124 foreach($this->items as $id => $obj)
126 $obj->unserializeData(
$data[$id]);
131 foreach($this->items as $id => $obj)
133 if(method_exists($obj,
"setValue"))
149 if(in_array($mode, array(self::COMPARISON_ASCENDING, self::COMPARISON_DESCENDING)))
151 foreach($this->items as $obj)
153 if(!method_exists($obj,
"getPostValueForComparison"))
158 $this->comparison_mode = $mode;
170 if(is_array($a_value))
172 foreach($a_value as $id => $value)
174 if(isset($this->items[$id]))
176 $this->items[$id]->setValue($value);
180 else if($a_value === NULL)
182 foreach($this->items as $item)
184 if(method_exists($item,
"setValue"))
186 $item->setValue(NULL);
189 else if(method_exists($item,
"setDate"))
194 else if(method_exists($item,
"setMonths"))
199 $item->setMinutes(0);
200 $item->setSeconds(0);
214 foreach($this->items as $id => $obj)
216 $result[$id] = $obj->getValue();
228 foreach($this->items as $id => $obj)
230 $obj->setValueByArray($a_values);
241 if(
sizeof($this->items))
243 foreach($this->items as $id => $obj)
245 if(!$obj->checkInput())
251 if($this->comparison_mode)
254 foreach($this->items as $id => $obj)
256 $value = $obj->getPostValueForComparison();
261 if($this->comparison_mode == self::COMPARISON_ASCENDING)
294 $a_tpl->setCurrentBlock(
"prop_generic");
295 $a_tpl->setVariable(
"PROP_GENERIC", $html);
296 $a_tpl->parseCurrentBlock();
306 $tpl =
new ilTemplate(
"tpl.prop_combination.html",
true,
true,
"Services/Form");
308 if(
sizeof($this->items))
310 foreach($this->items as $id => $obj)
313 if(isset($this->labels[$id]))
315 $tpl->setCurrentBlock(
"prop_combination_label");
316 $tpl->setVariable(
"LABEL", $this->labels[$id]);
317 $tpl->parseCurrentBlock();
320 $tpl->setCurrentBlock(
"prop_combination");
321 $tpl->setVariable(
"FIELD", $obj->render());
322 $tpl->parseCurrentBlock();