ALIGN_LEFT
ALIGN_LEFT
A column definition for a tabular report.
This class is used to indicate how to display a value for a certain cell.
__construct(string $key, string $label, string $fmt = null, string $align = null, integer $sorting = null)
Construct a new column definition.
A column definition defines how values in an entire column will be treated.
| string | $key | The name of the column (must match the defined columns in the report definition). |
| string | $label | The displayable label for this column. |
| string | $fmt | The smarty tempalte that defines how values in this column will be displayed. |
| string | $align | The alignment for cells in this column. |
| integer | $sorting | A sorting prioriity for the column. |
set_value_processor(callable $fn)
Set an optional mechanism to adjust, process, or return a different value for values in this column.
This can be used for doing mathematical formulas on values, or retrieving foreign key related data from the database or otherwise translating input data.
| callable | $fn | A callable function that is of the form func(string $value,\CGExtensions\query\resultset) |
process_value(string $val, \CGExtensions\query\resultset $rs)
A callback method to process a value in this column.
by default this method will call the value processor callback (if defined), otherwise it will do nothing. This method is normally called by the report generator to determine the output value (but not the displayed string) for the column.
| string | $val | The current value for this column. |
| \CGExtensions\query\resultset | $rs | The resultset object. |