|
dolibarr 25.0.0-alpha
|
Set of function to manipulate custom reports. More...
Go to the source code of this file.
Functions | |
| fillArrayOfMeasures ($object, $tablealias, $labelofobject, &$arrayofmesures, $level=0, &$count=0, &$tablepath='') | |
| Fill arrayofmesures for an object. | |
| fillArrayOfXAxis ($object, $tablealias, $labelofobject, &$arrayofxaxis, $level=0, &$count=0, &$tablepath='') | |
| Fill arrayofmesures for an object. | |
| fillArrayOfGroupBy ($object, $tablealias, $labelofobject, &$arrayofgroupby, $level=0, &$count=0, &$tablepath='') | |
| Fill arrayofgroupby for an object. | |
| fillArrayOfFilterFields ($object, $tablealias, $labelofobject, &$arrayoffields, $level=0, &$count=0, &$tablepath='') | |
| Fill array of possible filter fields for an object. | |
| customReportsSelectMeasures ($htmlname, $arrayofmesures, $selected, $placeholder='') | |
| Return HTML of the component to select measures. | |
| customReportsSelectFieldCombo ($htmlname, $arrayoffields, $selected, $placeholder='', $allowclear=0) | |
| Return HTML of a combo to select one field (X axis, group by...). | |
| customReportsSelectXAxis ($htmlname, $arrayofxaxis, $selected, $placeholder='') | |
| Return HTML of the combo to select the X axis (see customReportsSelectFieldCombo()) | |
| customReportsSelectGroupBy ($htmlname, $arrayofgroupby, $selected, $placeholder='') | |
| Return HTML of the combo to select the group by field (see customReportsSelectFieldCombo()). | |
Set of function to manipulate custom reports.
Definition in file customreports.lib.php.
| customReportsSelectFieldCombo | ( | $htmlname, | |
| $arrayoffields, | |||
| $selected, | |||
| $placeholder = '', | |||
| $allowclear = 0 ) |
Return HTML of a combo to select one field (X axis, group by...).
Same look and principle than the combo of fields of the filter component: the main element is open with its fields, the sub-elements are listed after its fields and are collapsed. Behaviour is managed by core/js/customreports.js. Selection is posted with a hidden input.
| string | $htmlname | Name of the HTML field |
| array<string,array{label:string,labelnohtml:string,position:int|string,table:string,tablefromt:string}> | $arrayoffields Array of fields (from fillArrayOfXAxis() or fillArrayOfGroupBy()) | |
| string[] | $selected | Array of selected keys (only first one is used) |
| string | $placeholder | Placeholder |
| int<0,1> | $allowclear 1 to show a button to clear the selection |
| string | $elementkey | Key of the element to render |
Definition at line 800 of file customreports.lib.php.
References $conf, dol_escape_htmltag(), dol_escape_js(), and dol_string_nohtmltag().
Referenced by customReportsSelectGroupBy(), and customReportsSelectXAxis().
| customReportsSelectGroupBy | ( | $htmlname, | |
| $arrayofgroupby, | |||
| $selected, | |||
| $placeholder = '' ) |
Return HTML of the combo to select the group by field (see customReportsSelectFieldCombo()).
Selection can be cleared.
| string | $htmlname | Name of the HTML field |
| array<string,array{label:string,labelnohtml:string,position:int|string,table:string,tablefromt:string}> | $arrayofgroupby Array of group by (from fillArrayOfGroupBy()) | |
| string[] | $selected | Array of selected keys (only first one is used) |
| string | $placeholder | Placeholder |
Definition at line 945 of file customreports.lib.php.
References customReportsSelectFieldCombo().
| customReportsSelectMeasures | ( | $htmlname, | |
| $arrayofmesures, | |||
| $selected, | |||
| $placeholder = '' ) |
Return HTML of the component to select measures.
Fields are listed first and, for fields with variants (sum, average, min, max, standard deviation), variants are shown in an expandable sub list. Behaviour is managed by core/js/customreports.js. Selection is posted with a hidden multiple select.
| string | $htmlname | Name of the HTML field (posted as $htmlname[]) |
| array<string,array{label:string,labelnohtml:string,position:int|string,table:string,tablefromt:string}> | $arrayofmesures Array of measures (from fillArrayOfMeasures()) | |
| string[] | $selected | Array of selected keys |
| string | $placeholder | Placeholder |
Definition at line 689 of file customreports.lib.php.
References $conf, dol_escape_htmltag(), dol_escape_js(), and dol_strtolower().
| customReportsSelectXAxis | ( | $htmlname, | |
| $arrayofxaxis, | |||
| $selected, | |||
| $placeholder = '' ) |
Return HTML of the combo to select the X axis (see customReportsSelectFieldCombo())
| string | $htmlname | Name of the HTML field |
| array<string,array{label:string,labelnohtml:string,position:int|string,table:string,tablefromt:string}> | $arrayofxaxis Array of X axis (from fillArrayOfXAxis()) | |
| string[] | $selected | Array of selected keys (only first one is used) |
| string | $placeholder | Placeholder |
Definition at line 930 of file customreports.lib.php.
References customReportsSelectFieldCombo().
| fillArrayOfFilterFields | ( | $object, | |
| $tablealias, | |||
| $labelofobject, | |||
| & | $arrayoffields, | ||
| $level = 0, | |||
| & | $count = 0, | ||
| & | $tablepath = '' ) |
Fill array of possible filter fields for an object.
| CommonObject | $object | Any object |
| string | $tablealias | Alias of table ('t' for example) |
| string | $labelofobject | Label of object |
| array<string,array{label:string,labelnohtml:string,position:int,table:string,tablefromt:string,type:string,bi?:int<0,1>}> | $arrayoffields Array of fields already filled | |
| int | $level | Level |
| int | $count | Count |
| string | $tablepath | Path of all tables ('t' or 't,contract' or 't,contract,societe'...) |
Definition at line 556 of file customreports.lib.php.
References $object, dol_eval(), dol_include_once(), and fillArrayOfFilterFields().
Referenced by fillArrayOfFilterFields().
| fillArrayOfGroupBy | ( | $object, | |
| $tablealias, | |||
| $labelofobject, | |||
| & | $arrayofgroupby, | ||
| $level = 0, | |||
| & | $count = 0, | ||
| & | $tablepath = '' ) |
Fill arrayofgroupby for an object.
| CommonObject | $object | Any object |
| string | $tablealias | Alias of table |
| string | $labelofobject | Label of object |
| array<string,array{label:string,labelnohtml:string,position:int,table:string,tablefromt:string}> | $arrayofgroupby Array of groupby already filled | |
| int | $level | Level |
| int | $count | Count |
| string | $tablepath | Path of all tables ('t' or 't,contract' or 't,contract,societe'...) |
Definition at line 381 of file customreports.lib.php.
References $object, dol_eval(), dol_include_once(), and fillArrayOfGroupBy().
Referenced by fillArrayOfGroupBy().
| fillArrayOfMeasures | ( | $object, | |
| $tablealias, | |||
| $labelofobject, | |||
| & | $arrayofmesures, | ||
| $level = 0, | |||
| & | $count = 0, | ||
| & | $tablepath = '' ) |
Fill arrayofmesures for an object.
| mixed | $object | Any object |
| string | $tablealias | Alias of table |
| string | $labelofobject | Label of object |
| array<string,array{label:string,labelnohtml:string,position:int,table:string,tablefromt:string}> | $arrayofmesures Array of measures already filled | |
| int | $level | Level |
| int | $count | Count |
| string | $tablepath | Path of all tables ('t' or 't,contract' or 't,contract,societe'...) |
Definition at line 39 of file customreports.lib.php.
References $object, dol_eval(), dol_include_once(), and fillArrayOfMeasures().
Referenced by fillArrayOfMeasures().
| fillArrayOfXAxis | ( | $object, | |
| $tablealias, | |||
| $labelofobject, | |||
| & | $arrayofxaxis, | ||
| $level = 0, | |||
| & | $count = 0, | ||
| & | $tablepath = '' ) |
Fill arrayofmesures for an object.
| mixed | $object | Any object |
| string | $tablealias | Alias of table ('t' for example) |
| string | $labelofobject | Label of object |
| array<string,array{label:string,labelnohtml:string,position:int,table:string,tablefromt:string}> | $arrayofxaxis Array of xaxis already filled | |
| int | $level | Level |
| int | $count | Count |
| string | $tablepath | Path of all tables ('t' or 't,contract' or 't,contract,societe'...) |
Definition at line 202 of file customreports.lib.php.
References $object, dol_eval(), dol_include_once(), and fillArrayOfXAxis().
Referenced by fillArrayOfXAxis().