57 throw new Exception(
'ADTFormBridge Type mismatch.');
80 $this->form = $a_form;
100 $this->
id = (string) $a_value;
120 $this->title = trim($a_value);
140 $this->
info = trim($a_value);
160 if (!is_array($a_value)) {
161 $a_value = (string) $a_value;
173 return $this->parent;
183 $this->disabled = (bool) $a_value;
203 $this->required = (bool) $a_value;
250 if (is_array($parent_def)) {
251 $parent_option = $parent_def[1];
252 $parent_def = $parent_def[0];
257 $parent_field = $this->
getForm()->getItemByPostVar($parent_def);
260 if ($parent_option && method_exists($parent_field,
"getOptions")) {
261 foreach ($parent_field->getOptions() as $option) {
262 if ($option->getValue() == $parent_option) {
263 $parent_field = $option;
271 return $parent_field;
285 $field->addSubItem($a_field);
287 $this->
getForm()->addItem($a_field);
313 return !$this->
getADT()->isNull();
330 $parent_option = null;
335 return $a_parent_adt->isActiveForSubItems($parent_option);
360 $field->setAlert(
$lng->txt(
"msg_input_is_required"));
364 elseif (!$this->
getADT()->isValid()) {
367 $mess = $this->
getADT()->getValidationErrors();
368 foreach ($mess as $error_code) {
369 $tmp[] = $this->
getADT()->translateErrorCode($error_code);
373 $field->setAlert(implode(
"<br />", $tmp));
384 $field->setAlert(implode(
"<br />", $a_errors));
special template class to simplify handling of ITX/PEAR
ADT definition base class.