39 global $langs, $extrafields, $db;
45 return $arrayofmesures;
48 if (empty($tablepath)) {
49 $tablepath =
$object->table_element.
'='.$tablealias;
51 $tablepath .=
','.$object->table_element.
'='.$tablealias;
56 $arrayofmesures[$tablealias.
'.count'] = array(
57 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans(
"Number"),
58 'labelnohtml' => $labelofobject.
': '.$langs->trans(
"Number"),
60 'table' =>
$object->table_element,
61 'tablefromt' => $tablepath
68 foreach (
$object->fields as $key => $val) {
69 if (!empty($val[
'isameasure']) && (!isset($val[
'enabled']) || (int)
dol_eval($val[
'enabled'], 1, 1,
'1'))) {
70 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
71 $arrayofmesures[$tablealias.
'.'.$key.
'-sum'] = array(
72 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Sum").
')</span>',
73 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
74 'position' => ($position + ($count * 100000)).
'.1',
75 'table' =>
$object->table_element,
76 'tablefromt' => $tablepath
78 $arrayofmesures[$tablealias.
'.'.$key.
'-average'] = array(
79 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Average").
')</span>',
80 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
81 'position' => ($position + ($count * 100000)).
'.2',
82 'table' =>
$object->table_element,
83 'tablefromt' => $tablepath
85 $arrayofmesures[$tablealias.
'.'.$key.
'-min'] = array(
86 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Minimum").
')</span>',
87 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
88 'position' => ($position + ($count * 100000)).
'.3',
89 'table' =>
$object->table_element,
90 'tablefromt' => $tablepath
92 $arrayofmesures[$tablealias.
'.'.$key.
'-max'] = array(
93 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Maximum").
')</span>',
94 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
95 'position' => ($position + ($count * 100000)).
'.4',
96 'table' =>
$object->table_element,
97 'tablefromt' => $tablepath
100 $arrayofmesures[$tablealias.
'.'.$key.
'-stddevpop'] = array(
101 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"StandardDeviationPop").
')</span>',
102 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
103 'position' => ($position + ($count * 100000)).
'.5',
104 'table' =>
$object->table_element,
105 'tablefromt' => $tablepath
111 if (!empty(
$object->isextrafieldmanaged) && isset($extrafields->attributes[
$object->table_element][
'label'])) {
112 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
113 if (!empty($extrafields->attributes[
$object->table_element][
'totalizable'][$key]) && (!isset($extrafields->attributes[
$object->table_element][
'enabled'][$key]) || (int)
dol_eval((
string) $extrafields->attributes[
$object->table_element][
'enabled'][$key], 1, 1,
'1'))) {
115 $position = (!empty($val[
'position']) ? $val[
'position'] : 0);
116 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-sum'] = array(
117 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($extrafields->attributes[
$object->table_element][
'label'][$key]).
' <span class="opacitymedium">('.$langs->trans(
"Sum").
')</span>',
118 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
119 'position' => ($position + ($count * 100000)).
'.1',
120 'table' =>
$object->table_element,
121 'tablefromt' => $tablepath
123 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-average'] = array(
124 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($extrafields->attributes[
$object->table_element][
'label'][$key]).
' <span class="opacitymedium">('.$langs->trans(
"Average").
')</span>',
125 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
126 'position' => ($position + ($count * 100000)).
'.2',
127 'table' =>
$object->table_element,
128 'tablefromt' => $tablepath
130 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-min'] = array(
131 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($extrafields->attributes[
$object->table_element][
'label'][$key]).
' <span class="opacitymedium">('.$langs->trans(
"Minimum").
')</span>',
132 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
133 'position' => ($position + ($count * 100000)).
'.3',
134 'table' =>
$object->table_element,
135 'tablefromt' => $tablepath
137 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-max'] = array(
138 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($extrafields->attributes[
$object->table_element][
'label'][$key]).
' <span class="opacitymedium">('.$langs->trans(
"Maximum").
')</span>',
139 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
140 'position' => ($position + ($count * 100000)).
'.4',
141 'table' =>
$object->table_element,
142 'tablefromt' => $tablepath
145 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-stddevpop'] = array(
146 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($extrafields->attributes[
$object->table_element][
'label'][$key]).
' <span class="opacitymedium">('.$langs->trans(
"StandardDeviationPop").
')</span>',
147 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
148 'position' => ($position + ($count * 100000)).
'.5',
149 'table' =>
$object->table_element,
150 'tablefromt' => $tablepath
157 foreach (
$object->fields as $key => $val) {
158 if (preg_match(
'/^[^:]+:[^:]+:/', $val[
'type'])) {
159 $tmptype = explode(
':', $val[
'type'], 4);
160 if ($tmptype[0] ==
'integer' && !empty($tmptype[1]) && !empty($tmptype[2])) {
161 $newobject = $tmptype[1];
163 if (class_exists($newobject)) {
164 $tmpobject =
new $newobject($db);
167 $arrayofmesures =
fillArrayOfMeasures($tmpobject, $tablealias.
'__'.$key, $langs->trans($val[
'label']), $arrayofmesures, $level + 1, $count, $tablepath);
169 print
'For property '.$object->element.
'->'.$key.
', type="'.$val[
'type'].
'": Failed to find class '.$newobject.
" in file ".$tmptype[2].
"<br>\n";
175 return $arrayofmesures;
193 global $langs, $extrafields, $db;
199 return $arrayofxaxis;
202 if (empty($tablepath)) {
203 $tablepath =
$object->table_element.
'='.$tablealias;
205 $tablepath .=
','.$object->table_element.
'='.$tablealias;
208 $YYYY = substr($langs->trans(
"Year"), 0, 1).substr($langs->trans(
"Year"), 0, 1).substr($langs->trans(
"Year"), 0, 1).substr($langs->trans(
"Year"), 0, 1);
209 $MM = substr($langs->trans(
"Month"), 0, 1).substr($langs->trans(
"Month"), 0, 1);
210 $DD = substr($langs->trans(
"Day"), 0, 1).substr($langs->trans(
"Day"), 0, 1);
211 $HH = substr($langs->trans(
"Hour"), 0, 1).substr($langs->trans(
"Hour"), 0, 1);
212 $MI = substr($langs->trans(
"Minute"), 0, 1).substr($langs->trans(
"Minute"), 0, 1);
213 $SS = substr($langs->trans(
"Second"), 0, 1).substr($langs->trans(
"Second"), 0, 1);
222 foreach (
$object->fields as $key => $val) {
223 if (empty($val[
'measure'])) {
224 if (in_array($key, array(
225 'id',
'ref_ext',
'rowid',
'entity',
'last_main_doc',
'logo',
'logo_squarred',
'extraparams',
226 'parent',
'photo',
'socialnetworks',
'webservices_url',
'webservices_key'))) {
229 if (isset($val[
'enabled']) && ! (
int)
dol_eval($val[
'enabled'], 1, 1,
'1')) {
232 if (isset($val[
'visible']) && ! (
int)
dol_eval($val[
'visible'], 1, 1,
'1')) {
235 if (preg_match(
'/^fk_/', $key) && !preg_match(
'/^fk_statu/', $key)) {
238 if (preg_match(
'/^pass/', $key)) {
241 if (in_array($val[
'type'], array(
'html',
'text'))) {
244 if (in_array($val[
'type'], array(
'timestamp',
'date',
'datetime'))) {
245 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
246 $arrayofxaxis[$tablealias.
'.'.$key.
'-year'] = array(
247 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
')</span>',
248 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
249 'position' => ($position + ($count * 100000)).
'.1',
250 'table' =>
$object->table_element,
251 'tablefromt' => $tablepath
253 $arrayofxaxis[$tablealias.
'.'.$key.
'-month'] = array(
254 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
255 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
256 'position' => ($position + ($count * 100000)).
'.2',
257 'table' =>
$object->table_element,
258 'tablefromt' => $tablepath
260 $arrayofxaxis[$tablealias.
'.'.$key.
'-day'] = array(
261 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
262 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
263 'position' => ($position + ($count * 100000)).
'.3',
264 'table' =>
$object->table_element,
265 'tablefromt' => $tablepath
268 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
269 $arrayofxaxis[$tablealias.
'.'.$key] = array(
270 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']),
271 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
272 'position' => ($position + ($count * 100000)),
273 'table' =>
$object->table_element,
274 'tablefromt' => $tablepath
281 if (!empty(
$object->isextrafieldmanaged) && isset($extrafields->attributes[
$object->table_element][
'label'])) {
282 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
283 if ($extrafields->attributes[
$object->table_element][
'type'][$key] ==
'separate') {
286 if (!empty($extrafields->attributes[
$object->table_element][
'totalizable'][$key])) {
290 if (in_array($extrafields->attributes[
$object->table_element][
'type'][$key], array(
'timestamp',
'date',
'datetime'))) {
291 $position = (empty($extrafields->attributes[
$object->table_element][
'pos'][$key]) ? 0 : intval($extrafields->attributes[
$object->table_element][
'pos'][$key]));
292 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-year'] = array(
293 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
')</span>',
294 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
295 'position' => ($position + ($count * 100000)).
'.1',
296 'table' =>
$object->table_element,
297 'tablefromt' => $tablepath
299 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-month'] = array(
300 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
301 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
302 'position' => ($position + ($count * 100000)).
'.2',
303 'table' =>
$object->table_element,
304 'tablefromt' => $tablepath
306 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-day'] = array(
307 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
308 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
309 'position' => ($position + ($count * 100000)).
'.3',
310 'table' =>
$object->table_element,
311 'tablefromt' => $tablepath
314 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key] = array(
315 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val),
316 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
317 'position' => 1000 + (int) $extrafields->attributes[
$object->table_element][
'pos'][$key] + ($count * 100000),
318 'table' =>
$object->table_element,
319 'tablefromt' => $tablepath
326 foreach (
$object->fields as $key => $val) {
327 if (preg_match(
'/^[^:]+:[^:]+:/', $val[
'type'])) {
328 $tmptype = explode(
':', $val[
'type'], 4);
329 if ($tmptype[0] ==
'integer' && $tmptype[1] && $tmptype[2]) {
330 $newobject = $tmptype[1];
332 if (class_exists($newobject)) {
333 $tmpobject =
new $newobject($db);
336 $arrayofxaxis =
fillArrayOfXAxis($tmpobject, $tablealias.
'__'.$key, $langs->trans($val[
'label']), $arrayofxaxis, $level + 1, $count, $tablepath);
338 print
'For property '.$object->element.
'->'.$key.
', type="'.$val[
'type'].
'": Failed to find class '.$newobject.
" in file ".$tmptype[2].
"<br>\n";
344 return $arrayofxaxis;
362 global $langs, $extrafields, $db;
368 return $arrayofgroupby;
371 if (empty($tablepath)) {
372 $tablepath =
$object->table_element.
'='.$tablealias;
374 $tablepath .=
','.$object->table_element.
'='.$tablealias;
377 $YYYY = substr($langs->trans(
"Year"), 0, 1).substr($langs->trans(
"Year"), 0, 1).substr($langs->trans(
"Year"), 0, 1).substr($langs->trans(
"Year"), 0, 1);
378 $MM = substr($langs->trans(
"Month"), 0, 1).substr($langs->trans(
"Month"), 0, 1);
379 $DD = substr($langs->trans(
"Day"), 0, 1).substr($langs->trans(
"Day"), 0, 1);
380 $HH = substr($langs->trans(
"Hour"), 0, 1).substr($langs->trans(
"Hour"), 0, 1);
381 $MI = substr($langs->trans(
"Minute"), 0, 1).substr($langs->trans(
"Minute"), 0, 1);
382 $SS = substr($langs->trans(
"Second"), 0, 1).substr($langs->trans(
"Second"), 0, 1);
387 foreach (
$object->fields as $key => $val) {
388 if (empty($val[
'isameasure'])) {
389 if (in_array($key, array(
390 'id',
'ref_ext',
'rowid',
'entity',
'last_main_doc',
'logo',
'logo_squarred',
'extraparams',
391 'parent',
'photo',
'socialnetworks',
'webservices_url',
'webservices_key'))) {
394 if (isset($val[
'enabled']) && ! (
int)
dol_eval($val[
'enabled'], 1, 1,
'1')) {
397 if (isset($val[
'visible']) && ! (
int)
dol_eval($val[
'visible'], 1, 1,
'1')) {
400 if (preg_match(
'/^fk_/', $key) && !preg_match(
'/^fk_statu/', $key)) {
403 if (preg_match(
'/^pass/', $key)) {
406 if (in_array($val[
'type'], array(
'html',
'text'))) {
409 if (in_array($val[
'type'], array(
'timestamp',
'date',
'datetime'))) {
410 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
411 $arrayofgroupby[$tablealias.
'.'.$key.
'-year'] = array(
412 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
')</span>',
413 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
414 'position' => ($position + ($count * 100000)).
'.1',
415 'table' =>
$object->table_element,
416 'tablefromt' => $tablepath
418 $arrayofgroupby[$tablealias.
'.'.$key.
'-month'] = array(
419 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
420 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
421 'position' => ($position + ($count * 100000)).
'.2',
422 'table' =>
$object->table_element,
423 'tablefromt' => $tablepath
425 $arrayofgroupby[$tablealias.
'.'.$key.
'-day'] = array(
426 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
427 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
428 'position' => ($position + ($count * 100000)).
'.3',
429 'table' =>
$object->table_element,
430 'tablefromt' => $tablepath
433 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
434 $arrayofgroupby[$tablealias.
'.'.$key] = array(
435 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']),
436 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
437 'position' => ($position + ($count * 100000)),
438 'table' =>
$object->table_element,
439 'tablefromt' => $tablepath
446 if (!empty(
$object->isextrafieldmanaged) && isset($extrafields->attributes[
$object->table_element][
'label'])) {
447 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
448 if ($extrafields->attributes[
$object->table_element][
'type'][$key] ==
'separate') {
451 if (!empty($extrafields->attributes[
$object->table_element][
'totalizable'][$key])) {
455 if (in_array($extrafields->attributes[
$object->table_element][
'type'][$key], array(
'timestamp',
'date',
'datetime'))) {
456 $position = (empty($extrafields->attributes[
$object->table_element][
'pos'][$key]) ? 0 : intval($extrafields->attributes[
$object->table_element][
'pos'][$key]));
457 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-year'] = array(
458 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
')</span>',
459 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
460 'position' => ($position + ($count * 100000)).
'.1',
461 'table' =>
$object->table_element,
462 'tablefromt' => $tablepath
464 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-month'] = array(
465 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
466 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
467 'position' => ($position + ($count * 100000)).
'.2',
468 'table' =>
$object->table_element,
469 'tablefromt' => $tablepath
471 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-day'] = array(
472 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
473 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
474 'position' => ($position + ($count * 100000)).
'.3',
475 'table' =>
$object->table_element,
476 'tablefromt' => $tablepath
479 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key] = array(
480 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val),
481 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
482 'position' => 1000 + (int) $extrafields->attributes[
$object->table_element][
'pos'][$key] + ($count * 100000),
483 'table' =>
$object->table_element,
484 'tablefromt' => $tablepath
491 foreach (
$object->fields as $key => $val) {
492 if (preg_match(
'/^[^:]+:[^:]+:/', $val[
'type'])) {
493 $tmptype = explode(
':', $val[
'type'], 4);
494 if ($tmptype[0] ==
'integer' && $tmptype[1] && $tmptype[2]) {
495 $newobject = $tmptype[1];
497 if (class_exists($newobject)) {
498 $tmpobject =
new $newobject($db);
501 $arrayofgroupby =
fillArrayOfGroupBy($tmpobject, $tablealias.
'__'.$key, $langs->trans($val[
'label']), $arrayofgroupby, $level + 1, $count, $tablepath);
503 print
'For property '.$object->element.
'->'.$key.
', type="'.$val[
'type'].
'": Failed to find class '.$newobject.
" in file ".$tmptype[2].
"<br>\n";
509 return $arrayofgroupby;
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)