3 require_once
"Services/ADT/classes/Bridges/class.ilADTFormBridge.php";
16 if(
sizeof($this->elements))
21 $this->elements =
array();
28 $this->elements[$name] = $factory->getFormBridgeForInstance($element);
29 $this->elements[$name]->setForm($this->
getForm());
30 $this->elements[$name]->setElementId($name);
43 if(array_key_exists($a_name, $this->elements))
45 return $this->elements[$a_name];
65 foreach($this->elements as $element)
67 $element->addToForm();
74 foreach($this->elements as $element)
76 $element->addJS($a_tpl);
83 foreach($this->elements as $element)
86 $parent = $element->getParentElement();
93 if(isset($adt_forms[$parent]))
95 $parent = $adt_forms[$parent];
102 if($element->shouldBeImportedFromPost($parent))
104 $element->importFromPost();
116 foreach($this->
getElements() as $element_id => $element)
118 if($element->isRequired() && $element->getADT()->isNull())
120 $field = $this->
getForm()->getItemByPostvar($element_id);
121 $field->setAlert($lng->txt(
"msg_input_is_required"));
125 else if(!$element->validate())
131 if(!$this->
getADT()->isValid())
137 $mess = $this->
getADT()->getValidationErrorsByElements();
138 foreach($mess as $error_code => $element_id)
140 $tmp[$element_id][] = $this->
getADT()->translateErrorCode($error_code);
143 foreach($tmp as $element_id =>
$errors)
145 $field = $this->
getForm()->getItemByPostvar($element_id);
146 $field->setAlert(implode(
"<br />",
$errors));
static getInstance()
Get singleton.
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.