public function listActivitiesAction() { try { if ($this->_isUserAllowed(null, null)) { if ($this->hasParam('id') == FALSE) { $this->redirectNoId(); } $id = $this->_getParam('id'); $evDomain = new Assistance_Domain_Event(); $event = $evDomain->getById($id); $this->view->event = $event; $activities = $evDomain->getActivities($id, array('orderby' => array('assistance_date DESC', 'assistance_time DESC'))); $this->view->activities = $activities; } } catch (Exception $e) { $this->_addExceptionMessage($e); } }
public function getTotalActivities() { if (is_null($this->totalActivities)) { $evDomain = new Assistance_Domain_Event(); $this->totalActivities = $evDomain->countActivities($this->getId()); } return $this->totalActivities; }