You are here

function forena_report_menu_callback in Forena Reports 7.4

Same name and namespace in other branches
  1. 8 forena.module \forena_report_menu_callback()
  2. 7.5 forena.module \forena_report_menu_callback()
  3. 7.3 forena.module \forena_report_menu_callback()

Menu callback for rendering the forena report.

1 string reference to 'forena_report_menu_callback'
FrxMenu::addMenuItems in ./FrxMenu.inc
Add menu items to the items array

File

./forena.module, line 1158

Code

function forena_report_menu_callback() {
  $args = func_get_args();
  $path = array_shift($args);
  $report_name = array_shift($args);
  $parms = $_GET;
  unset($parms['q']);
  $menu_parms = array();
  $tokens = Frx::Menu()
    ->tokens($path);
  if ($args && $tokens) {
    foreach ($args as $i => $value) {
      @($menu_parms[$tokens[$i]] = $value);
    }
  }
  Frx::Data()
    ->setContext('menu-parms', $menu_parms);
  $parms = array_merge($parms, $menu_parms);
  $output = forena_report($report_name, $parms);
  if ($output) {
    return $output;
  }
}