48 public $errors = array();
65 $this->errors = array();
66 $this->attributes = array();
86 if (empty($elementtype))
return array();
88 if ($elementtype ==
'thirdparty') $elementtype =
'societe';
89 if ($elementtype ==
'contact') $elementtype =
'socpeople';
90 if ($elementtype ==
'order_supplier') $elementtype =
'commande_fournisseur';
93 $array_name_label = array();
94 if (!empty($conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR)) {
95 $tmpelement = explode(
';', $conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR);
96 foreach ($tmpelement as $elementstring) {
98 preg_match(
'/^(.*):(.*)$/', $elementstring, $reg);
100 $array_name_label[$element] = array();
101 $tmpfields = explode(
',', $reg[2]);
102 foreach ($tmpfields as $field) {
106 $array_name_label[$element][$field] = $field;
111 $this->attributes = $array_name_label;
113 return $array_name_label;
132 public function showInputField($key, $value, $extrafieldsobjectkey, $moreparam =
'', $keysuffix =
'', $keyprefix =
'', $morecss =
'', $objectid = 0, $mode = 0)
134 global $conf, $langs, $form;
136 if (!is_object($form))
138 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
139 $form =
new Form($this->
db);
144 if (!preg_match(
'/options_$/', $keyprefix))
146 $keyprefix = $keyprefix.
'options_';
164 global $conf, $langs;
166 $out = $this->attributes[$extrafieldsobjectkey][$key];
$conf db
API class for accounts.