Hi,
This is the code I have in one of my reports. it represents a column of hours of a timetable for students. currently, the values of the columns are hard coded but I generated an array that holds the hours for this columns
->pipe(new \koolreport\processes\ColumnMeta(array(
'hour_num'=>array('label'=>lang('tts.hour_num')),
'1' => array("label" => lang('tts.day_1')),
'2' => array("label" => lang('tts.day_2')),
'3' => array("label" => lang('tts.day_3')),
'4' => array("label" => lang('tts.day_4')),
'5' => array("label" => lang('tts.day_5')),
'6' => array("label" => lang('tts.day_6')),
)))
I want to do the same code but it will return the column values from an array stored in the $_SESSION for example:
->pipe(new \koolreport\processes\ColumnMeta(array(
"{value}" => function() {
return '1' => array("label" => lang('tts.day_1'));
etc...
}
)))
will appreciate your help