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 $tpl, string $align, int $span)
Construct a new tabular_report_cellfmt.
string | $key | The name of the column (must match a defined column). |
string | $tpl | The smarty template for displaying values for this cell. Default value is '{$val}'. |
string | $align | The alignment for this cell. See the ALIGN constants in this class. |
int | $span | The number of columns this cell should span. Some generators may ignore this. |
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. |