3 if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement))
6 dol_print_error(
'',
'include of file commonfieldsinexport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement was not set');
9 if (empty($keyforalias)) $keyforalias =
't';
12 if (class_exists($keyforclass))
14 $tmpobject =
new $keyforclass($this->
db);
17 foreach ($tmpobject->fields as $keyfield => $valuefield)
19 $fieldname = $keyforalias.
'.'.$keyfield;
20 $fieldlabel = ucfirst($valuefield[
'label']);
22 $typefield = preg_replace(
'/\(.*$/',
'', $valuefield[
'type']);
28 $typeFilter =
"Numeric";
36 $typeFilter =
"Boolean";
51 if (!empty($valuefield[
'help'])) {
52 $helpfield = preg_replace(
'/\(.*$/',
'', $valuefield[
'help']);
54 if ($valuefield[
'enabled']) {
55 $this->export_fields_array[$r][$fieldname] = $fieldlabel;
56 $this->export_TypeFields_array[$r][$fieldname] = $typeFilter;
57 $this->export_entities_array[$r][$fieldname] = $keyforelement;
58 $this->export_help_array[$r][$fieldname] = $helpfield;
62 dol_print_error($this->
db,
'Failed to find class '.$keyforclass.
', even after the include of '.$keyforclassfile);
if(!function_exists('dol_getprefix')) dol_include_once($relpath, $classname= '')
Make an include_once using default root and alternate root if it fails.
$conf db
API class for accounts.
dol_print_error($db= '', $error= '', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...