/** * List all timesheets available for the given * project/client */ public function listAction() { $pid = $this->_getParam('projectid'); $where = array(); if ($pid) { $where['projectid='] = $pid; } $cid = $this->_getParam('clientid'); if ($cid) { $where['clientid='] = $cid; } $this->view->timesheets = $this->projectService->getTimesheets($where); $this->renderView('timesheet/list.php'); }
public function editAction($model = null) { $this->view->project = $this->projectService->getProject((int) $this->_getParam('projectid')); $this->view->timesheets = $this->projectService->getTimesheets(array('projectid=' => $this->view->project->id)); parent::editAction($model); }