You are here

function forena_format_data in Forena Reports 7

Same name and namespace in other branches
  1. 6 forena.common.inc \forena_format_data()
1 call to forena_format_data()
FrxReport::format in ./FrxReport.inc

File

./forena.common.inc, line 441
Common functions used throughout the project but loaded in this file to keep the module file lean.

Code

function forena_format_data($value, $format, $format_str) {
  $fo = forena_get_formatter($format);
  if ($fo) {
    $ret = $fo
      ->{$format}($value, $format_str);
  }
  else {
    $ret = $value;
  }
  return $ret;
}