public function testReport() { foreach ($this->ret as $sbasid => $collections) { $this->report = new module_report(self::$DI['app'], $this->dmin, $this->dmax, $sbasid, $collections); $this->report->setUser_id(self::$DI['user']->getId()); $this->assertEquals($collections, $this->report->getListCollId()); $this->host($this->report); } }
private function recordFilter(module_report $report) { $this->filter['record'] = false; $dl_coll_filter = $params = []; $n = 0; if ($report->getUserId() != '') { $tab = explode(",", $report->getListCollId()); foreach ($tab as $val) { $dl_coll_filter[] = "record.coll_id = :record_fil" . $n; $params[":record_fil" . $n] = phrasea::collFromBas($this->app, $val); $n++; } if (count($dl_coll_filter) > 0) { $this->filter['record'] = array('sql' => implode(' OR ', $dl_coll_filter), 'params' => $params); } } return; }