You are here

public function FrxReportFile::menuReports in Forena Reports 7.4

File

./FrxReportFile.inc, line 95

Class

FrxReportFile

Code

public function menuReports() {
  global $language;
  $this
    ->validateAllCache();
  $data = $this
    ->getCache('frx');
  $reports = array();
  foreach ($data as $base_name => $obj) {
    if ($obj->cache && isset($obj->cache['menu']['path']) && ($obj->cache['language'] == $language->language || $obj->cache['language'] == 'en' && !isset($obj->cache['menu']['path']))) {
      if ($obj->cache['language'] != 'en') {
        $obj->name = substr($base_name, 3);
      }
      else {
        $obj->name = $base_name;
      }
      $reports[$obj->cache['menu']['path']] = $obj;
    }
  }
  return $reports;
}