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 if(method_exists($this->items[$id],
"setValue"))
178 $this->items[$id]->setValue($value);
181 else if(method_exists($this->items[$id],
"setDate"))
183 $this->items[$id]->setDate($value);
188 else if($a_value === NULL)
190 foreach($this->items as $item)
192 if(method_exists($item,
"setValue"))
194 $item->setValue(NULL);
197 else if(method_exists($item,
"setDate"))
202 else if(method_exists($item,
"setMonths"))
207 $item->setMinutes(0);
208 $item->setSeconds(0);
222 foreach($this->items as $id => $obj)
224 if(method_exists($obj,
"getValue"))
226 $result[$id] = $obj->getValue();
229 else if(method_exists($obj,
"setDate"))
231 $result[$id] = $obj->getDate();
244 foreach($this->items as $id => $obj)
246 $obj->setValueByArray($a_values);
257 if(
sizeof($this->items))
259 foreach($this->items as $id => $obj)
261 if(!$obj->checkInput())
267 if($this->comparison_mode)
270 foreach($this->items as $id => $obj)
272 $value = $obj->getPostValueForComparison();
277 if($this->comparison_mode == self::COMPARISON_ASCENDING)
310 $a_tpl->setCurrentBlock(
"prop_generic");
311 $a_tpl->setVariable(
"PROP_GENERIC", $html);
312 $a_tpl->parseCurrentBlock();
322 $tpl =
new ilTemplate(
"tpl.prop_combination.html",
true,
true,
"Services/Form");
324 if(
sizeof($this->items))
326 foreach($this->items as $id => $obj)
329 if(isset($this->labels[$id]))
331 $tpl->setCurrentBlock(
"prop_combination_label");
332 $tpl->setVariable(
"LABEL", $this->labels[$id]);
333 $tpl->parseCurrentBlock();
336 $tpl->setCurrentBlock(
"prop_combination");
337 $tpl->setVariable(
"FIELD", $obj->render());
338 $tpl->parseCurrentBlock();