58 throw new Exception(
'ADTFormBridge Type mismatch.');
81 $this->form = $a_form;
101 $this->
id = (
string)$a_value;
121 $this->title = trim($a_value);
141 $this->info = trim($a_value);
161 if(!is_array($a_value))
163 $a_value = (
string)$a_value;
175 return $this->parent;
185 $this->disabled = (bool)$a_value;
205 $this->required = (bool)$a_value;
257 if(is_array($parent_def))
259 $parent_option = $parent_def[1];
260 $parent_def = $parent_def[0];
265 $parent_field = $this->
getForm()->getItemByPostVar($parent_def);
269 if($parent_option && method_exists($parent_field,
"getOptions"))
271 foreach($parent_field->getOptions() as $option)
273 if($option->getValue() == $parent_option)
275 $parent_field = $option;
284 return $parent_field;
299 $field->addSubItem($a_field);
303 $this->
getForm()->addItem($a_field);
330 return !$this->
getADT()->isNull();
349 $parent_option = null;
355 return $a_parent_adt->isActiveForSubItems($parent_option);
379 $field->setAlert($lng->txt(
"msg_input_is_required"));
383 else if(!$this->
getADT()->isValid())
387 $mess = $this->
getADT()->getValidationErrors();
388 foreach($mess as $error_code)
390 $tmp[] = $this->
getADT()->translateErrorCode($error_code);
394 $field->setAlert(implode(
"<br />", $tmp));
405 $field->setAlert(implode(
"<br />", $a_errors));
Add rich text string
The name of the decorator.
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.
ADT definition base class.