You are here

function forena_report_menu_callback in Forena Reports 8

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

Menu callback for rendering the forena report.

1 string reference to 'forena_report_menu_callback'
Menu::addMenuItems in src/Menu.php
Add menu items to the items array

File

./forena.module, line 207

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 = FrxAPI::Menu()
    ->tokens($path);
  if ($args && $tokens) {
    foreach ($args as $i => $value) {
      @($menu_parms[$tokens[$i]] = $value);
    }
  }
  FrxAPI::Data()
    ->setContext('menu-parms', $menu_parms);
  $parms = array_merge($parms, $menu_parms);
  return forena_report($report_name, $parms);
}