38 global $langs, $extrafields, $db;
44 return $arrayofmesures;
47 if (empty($tablepath)) {
48 $tablepath =
$object->table_element.
'='.$tablealias;
50 $tablepath .=
','.$object->table_element.
'='.$tablealias;
55 $arrayofmesures[$tablealias.
'.count'] = array(
56 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans(
"Number"),
57 'labelnohtml' => $labelofobject.
': '.$langs->trans(
"Number"),
59 'table' =>
$object->table_element,
60 'tablefromt' => $tablepath
67 foreach (
$object->fields as $key => $val) {
68 if (!empty($val[
'isameasure']) && (!isset($val[
'enabled']) || (int)
dol_eval($val[
'enabled'], 1, 1,
'1'))) {
69 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
70 $arrayofmesures[$tablealias.
'.'.$key.
'-sum'] = array(
71 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Sum").
')</span>',
72 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
73 'position' => ($position + ($count * 100000)).
'.1',
74 'table' =>
$object->table_element,
75 'tablefromt' => $tablepath
77 $arrayofmesures[$tablealias.
'.'.$key.
'-average'] = array(
78 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Average").
')</span>',
79 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
80 'position' => ($position + ($count * 100000)).
'.2',
81 'table' =>
$object->table_element,
82 'tablefromt' => $tablepath
84 $arrayofmesures[$tablealias.
'.'.$key.
'-min'] = array(
85 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Minimum").
')</span>',
86 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
87 'position' => ($position + ($count * 100000)).
'.3',
88 'table' =>
$object->table_element,
89 'tablefromt' => $tablepath
91 $arrayofmesures[$tablealias.
'.'.$key.
'-max'] = array(
92 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"Maximum").
')</span>',
93 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
94 'position' => ($position + ($count * 100000)).
'.4',
95 'table' =>
$object->table_element,
96 'tablefromt' => $tablepath
99 $arrayofmesures[$tablealias.
'.'.$key.
'-stddevpop'] = array(
100 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$langs->trans(
"StandardDeviationPop").
')</span>',
101 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
102 'position' => ($position + ($count * 100000)).
'.5',
103 'table' =>
$object->table_element,
104 'tablefromt' => $tablepath
110 if (!empty(
$object->isextrafieldmanaged) && isset($extrafields->attributes[
$object->table_element][
'label'])) {
111 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
112 if (!empty($extrafields->attributes[
$object->table_element][
'totalizable'][$key]) && (!isset($extrafields->attributes[
$object->table_element][
'enabled'][$key]) || (int)
dol_eval($extrafields->attributes[
$object->table_element][
'enabled'][$key], 1, 1,
'1'))) {
114 $position = (!empty($val[
'position']) ? $val[
'position'] : 0);
115 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-sum'] = array(
116 '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>',
117 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
118 'position' => ($position + ($count * 100000)).
'.1',
119 'table' =>
$object->table_element,
120 'tablefromt' => $tablepath
122 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-average'] = array(
123 '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>',
124 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
125 'position' => ($position + ($count * 100000)).
'.2',
126 'table' =>
$object->table_element,
127 'tablefromt' => $tablepath
129 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-min'] = array(
130 '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>',
131 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
132 'position' => ($position + ($count * 100000)).
'.3',
133 'table' =>
$object->table_element,
134 'tablefromt' => $tablepath
136 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-max'] = array(
137 '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>',
138 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
139 'position' => ($position + ($count * 100000)).
'.4',
140 'table' =>
$object->table_element,
141 'tablefromt' => $tablepath
144 $arrayofmesures[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-stddevpop'] = array(
145 '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>',
146 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
147 'position' => ($position + ($count * 100000)).
'.5',
148 'table' =>
$object->table_element,
149 'tablefromt' => $tablepath
156 foreach (
$object->fields as $key => $val) {
157 if (preg_match(
'/^[^:]+:[^:]+:/', $val[
'type'])) {
158 $tmptype = explode(
':', $val[
'type'], 4);
159 if ($tmptype[0] ==
'integer' && !empty($tmptype[1]) && !empty($tmptype[2])) {
160 $newobject = $tmptype[1];
162 if (class_exists($newobject)) {
163 $tmpobject =
new $newobject($db);
166 $arrayofmesures =
fillArrayOfMeasures($tmpobject, $tablealias.
'__'.$key, $langs->trans($val[
'label']), $arrayofmesures, $level + 1, $count, $tablepath);
168 print
'For property '.$object->element.
'->'.$key.
', type="'.$val[
'type'].
'": Failed to find class '.$newobject.
" in file ".$tmptype[2].
"<br>\n";
174 return $arrayofmesures;
192 global $langs, $extrafields, $db;
198 return $arrayofxaxis;
201 if (empty($tablepath)) {
202 $tablepath =
$object->table_element.
'='.$tablealias;
204 $tablepath .=
','.$object->table_element.
'='.$tablealias;
207 $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);
208 $MM = substr($langs->trans(
"Month"), 0, 1).substr($langs->trans(
"Month"), 0, 1);
209 $DD = substr($langs->trans(
"Day"), 0, 1).substr($langs->trans(
"Day"), 0, 1);
210 $HH = substr($langs->trans(
"Hour"), 0, 1).substr($langs->trans(
"Hour"), 0, 1);
211 $MI = substr($langs->trans(
"Minute"), 0, 1).substr($langs->trans(
"Minute"), 0, 1);
212 $SS = substr($langs->trans(
"Second"), 0, 1).substr($langs->trans(
"Second"), 0, 1);
221 foreach (
$object->fields as $key => $val) {
222 if (empty($val[
'measure'])) {
223 if (in_array($key, array(
224 'id',
'ref_ext',
'rowid',
'entity',
'last_main_doc',
'logo',
'logo_squarred',
'extraparams',
225 'parent',
'photo',
'socialnetworks',
'webservices_url',
'webservices_key'))) {
228 if (isset($val[
'enabled']) && ! (
int)
dol_eval($val[
'enabled'], 1, 1,
'1')) {
231 if (isset($val[
'visible']) && ! (
int)
dol_eval($val[
'visible'], 1, 1,
'1')) {
234 if (preg_match(
'/^fk_/', $key) && !preg_match(
'/^fk_statu/', $key)) {
237 if (preg_match(
'/^pass/', $key)) {
240 if (in_array($val[
'type'], array(
'html',
'text'))) {
243 if (in_array($val[
'type'], array(
'timestamp',
'date',
'datetime'))) {
244 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
245 $arrayofxaxis[$tablealias.
'.'.$key.
'-year'] = array(
246 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
')</span>',
247 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
248 'position' => ($position + ($count * 100000)).
'.1',
249 'table' =>
$object->table_element,
250 'tablefromt' => $tablepath
252 $arrayofxaxis[$tablealias.
'.'.$key.
'-month'] = array(
253 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
254 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
255 'position' => ($position + ($count * 100000)).
'.2',
256 'table' =>
$object->table_element,
257 'tablefromt' => $tablepath
259 $arrayofxaxis[$tablealias.
'.'.$key.
'-day'] = array(
260 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
261 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
262 'position' => ($position + ($count * 100000)).
'.3',
263 'table' =>
$object->table_element,
264 'tablefromt' => $tablepath
267 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
268 $arrayofxaxis[$tablealias.
'.'.$key] = array(
269 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']),
270 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
271 'position' => ($position + ($count * 100000)),
272 'table' =>
$object->table_element,
273 'tablefromt' => $tablepath
280 if (!empty(
$object->isextrafieldmanaged) && isset($extrafields->attributes[
$object->table_element][
'label'])) {
281 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
282 if ($extrafields->attributes[
$object->table_element][
'type'][$key] ==
'separate') {
285 if (!empty($extrafields->attributes[
$object->table_element][
'totalizable'][$key])) {
289 if (in_array($extrafields->attributes[
$object->table_element][
'type'][$key], array(
'timestamp',
'date',
'datetime'))) {
290 $position = (empty($extrafields->attributes[
$object->table_element][
'pos'][$key]) ? 0 : intval($extrafields->attributes[
$object->table_element][
'pos'][$key]));
291 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-year'] = array(
292 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
')</span>',
293 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
294 'position' => ($position + ($count * 100000)).
'.1',
295 'table' =>
$object->table_element,
296 'tablefromt' => $tablepath
298 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-month'] = array(
299 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
300 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
301 'position' => ($position + ($count * 100000)).
'.2',
302 'table' =>
$object->table_element,
303 'tablefromt' => $tablepath
305 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-day'] = array(
306 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
307 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
308 'position' => ($position + ($count * 100000)).
'.3',
309 'table' =>
$object->table_element,
310 'tablefromt' => $tablepath
313 $arrayofxaxis[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key] = array(
314 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val),
315 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
316 'position' => 1000 + (int) $extrafields->attributes[
$object->table_element][
'pos'][$key] + ($count * 100000),
317 'table' =>
$object->table_element,
318 'tablefromt' => $tablepath
325 foreach (
$object->fields as $key => $val) {
326 if (preg_match(
'/^[^:]+:[^:]+:/', $val[
'type'])) {
327 $tmptype = explode(
':', $val[
'type'], 4);
328 if ($tmptype[0] ==
'integer' && $tmptype[1] && $tmptype[2]) {
329 $newobject = $tmptype[1];
331 if (class_exists($newobject)) {
332 $tmpobject =
new $newobject($db);
335 $arrayofxaxis =
fillArrayOfXAxis($tmpobject, $tablealias.
'__'.$key, $langs->trans($val[
'label']), $arrayofxaxis, $level + 1, $count, $tablepath);
337 print
'For property '.$object->element.
'->'.$key.
', type="'.$val[
'type'].
'": Failed to find class '.$newobject.
" in file ".$tmptype[2].
"<br>\n";
343 return $arrayofxaxis;
361 global $langs, $extrafields, $db;
367 return $arrayofgroupby;
370 if (empty($tablepath)) {
371 $tablepath =
$object->table_element.
'='.$tablealias;
373 $tablepath .=
','.$object->table_element.
'='.$tablealias;
376 $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);
377 $MM = substr($langs->trans(
"Month"), 0, 1).substr($langs->trans(
"Month"), 0, 1);
378 $DD = substr($langs->trans(
"Day"), 0, 1).substr($langs->trans(
"Day"), 0, 1);
379 $HH = substr($langs->trans(
"Hour"), 0, 1).substr($langs->trans(
"Hour"), 0, 1);
380 $MI = substr($langs->trans(
"Minute"), 0, 1).substr($langs->trans(
"Minute"), 0, 1);
381 $SS = substr($langs->trans(
"Second"), 0, 1).substr($langs->trans(
"Second"), 0, 1);
386 foreach (
$object->fields as $key => $val) {
387 if (empty($val[
'isameasure'])) {
388 if (in_array($key, array(
389 'id',
'ref_ext',
'rowid',
'entity',
'last_main_doc',
'logo',
'logo_squarred',
'extraparams',
390 'parent',
'photo',
'socialnetworks',
'webservices_url',
'webservices_key'))) {
393 if (isset($val[
'enabled']) && ! (
int)
dol_eval($val[
'enabled'], 1, 1,
'1')) {
396 if (isset($val[
'visible']) && ! (
int)
dol_eval($val[
'visible'], 1, 1,
'1')) {
399 if (preg_match(
'/^fk_/', $key) && !preg_match(
'/^fk_statu/', $key)) {
402 if (preg_match(
'/^pass/', $key)) {
405 if (in_array($val[
'type'], array(
'html',
'text'))) {
408 if (in_array($val[
'type'], array(
'timestamp',
'date',
'datetime'))) {
409 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
410 $arrayofgroupby[$tablealias.
'.'.$key.
'-year'] = array(
411 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
')</span>',
412 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
413 'position' => ($position + ($count * 100000)).
'.1',
414 'table' =>
$object->table_element,
415 'tablefromt' => $tablepath
417 $arrayofgroupby[$tablealias.
'.'.$key.
'-month'] = array(
418 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
419 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
420 'position' => ($position + ($count * 100000)).
'.2',
421 'table' =>
$object->table_element,
422 'tablefromt' => $tablepath
424 $arrayofgroupby[$tablealias.
'.'.$key.
'-day'] = array(
425 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
426 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
427 'position' => ($position + ($count * 100000)).
'.3',
428 'table' =>
$object->table_element,
429 'tablefromt' => $tablepath
432 $position = (empty($val[
'position']) ? 0 : intval($val[
'position']));
433 $arrayofgroupby[$tablealias.
'.'.$key] = array(
434 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val[
'label']),
435 'labelnohtml' => $labelofobject.
': '.$langs->trans($val[
'label']),
436 'position' => ($position + ($count * 100000)),
437 'table' =>
$object->table_element,
438 'tablefromt' => $tablepath
445 if (!empty(
$object->isextrafieldmanaged) && isset($extrafields->attributes[
$object->table_element][
'label'])) {
446 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
447 if ($extrafields->attributes[
$object->table_element][
'type'][$key] ==
'separate') {
450 if (!empty($extrafields->attributes[
$object->table_element][
'totalizable'][$key])) {
454 if (in_array($extrafields->attributes[
$object->table_element][
'type'][$key], array(
'timestamp',
'date',
'datetime'))) {
455 $position = (empty($extrafields->attributes[
$object->table_element][
'pos'][$key]) ? 0 : intval($extrafields->attributes[
$object->table_element][
'pos'][$key]));
456 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-year'] = array(
457 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
')</span>',
458 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
459 'position' => ($position + ($count * 100000)).
'.1',
460 'table' =>
$object->table_element,
461 'tablefromt' => $tablepath
463 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-month'] = array(
464 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
')</span>',
465 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
466 'position' => ($position + ($count * 100000)).
'.2',
467 'table' =>
$object->table_element,
468 'tablefromt' => $tablepath
470 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key.
'-day'] = array(
471 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val).
' <span class="opacitymedium">('.$YYYY.
'-'.$MM.
'-'.$DD.
')</span>',
472 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
473 'position' => ($position + ($count * 100000)).
'.3',
474 'table' =>
$object->table_element,
475 'tablefromt' => $tablepath
478 $arrayofgroupby[preg_replace(
'/^t/',
'te', $tablealias).
'.'.$key] = array(
479 'label' =>
img_picto(
'', (empty(
$object->picto) ?
'generic' :
$object->picto),
'class="pictofixedwidth"').
' '.$labelofobject.
': '.$langs->trans($val),
480 'labelnohtml' => $labelofobject.
': '.$langs->trans($val),
481 'position' => 1000 + (int) $extrafields->attributes[
$object->table_element][
'pos'][$key] + ($count * 100000),
482 'table' =>
$object->table_element,
483 'tablefromt' => $tablepath
490 foreach (
$object->fields as $key => $val) {
491 if (preg_match(
'/^[^:]+:[^:]+:/', $val[
'type'])) {
492 $tmptype = explode(
':', $val[
'type'], 4);
493 if ($tmptype[0] ==
'integer' && $tmptype[1] && $tmptype[2]) {
494 $newobject = $tmptype[1];
496 if (class_exists($newobject)) {
497 $tmpobject =
new $newobject($db);
500 $arrayofgroupby =
fillArrayOfGroupBy($tmpobject, $tablealias.
'__'.$key, $langs->trans($val[
'label']), $arrayofgroupby, $level + 1, $count, $tablepath);
502 print
'For property '.$object->element.
'->'.$key.
', type="'.$val[
'type'].
'": Failed to find class '.$newobject.
" in file ".$tmptype[2].
"<br>\n";
508 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)