I am building some audit/compliance reports and am curious if there is a built in mechanism to highlight values out of spec. I think my ideal scenario would be something like this, where the return value is added to the css class for the cell that contains the value
Table::create(array(
...
"columns"=>array(
"col_name"=>array(
"label"=>"Cost",
"filter"=>function($value) {
switch ($value) {
case ($value < $minimum_accepted_value):
return "red";
case (($value > $minimum_accepted_value) && ($value < $maximum_accepted_value)):
return "green";
case ($value > $maximum_accepted_value):
return "orange";
default:
return;
}
}
)
),
...
));