/** * @param \ThinkopenAt\TimeFlies\Domain\Dto\ReportConfiguration $reportConfiguration * @param \ThinkopenAt\TimeFlies\Domain\Model\Category $category * @return void */ public function generateReportAction(ReportConfiguration $reportConfiguration, Category $category = NULL) { $reportConfiguration->setBeginFromParts(); $reportConfiguration->setEndFromParts(); $items = $this->itemRepository->findForReport($reportConfiguration, $category); $this->view->assign('value', $items); $this->view->setConfiguration(array('mapping' => array('value' => array('begin' => array('name' => 'begin'), 'end' => array('name' => 'end'), 'duration' => array('name' => 'duration'), 'category' => array('name' => 'category', 'subProperty' => array('name' => 'name')), 'comment' => array('name' => 'comment'))), 'outputHeaders' => TRUE)); }
/** * @param \ThinkopenAt\TimeFlies\Domain\Dto\ReportConfiguration $reportConfiguration * @param \ThinkopenAt\TimeFlies\Domain\Model\Category $category * @return void */ public function generateReportAction(ReportConfiguration $reportConfiguration, Category $category = NULL) { if (!$this->view instanceof \ThinkopenAt\TimeFlies\View\ReportInterface) { throw new \Exception('No valid report format selected'); } $reportConfiguration->setBeginFromParts(); $reportConfiguration->setEndFromParts(); $items = $this->itemRepository->findForReport($reportConfiguration, $category); $this->view->assign('value', $items); $this->view->assign('category', $category); $this->view->assign('reportConfiguration', $reportConfiguration); }