public function voteAction() { parent::isParticipanActive(); $_voteId = $this->getRequest()->getParam("vid"); $_answerId = $this->getRequest()->getParam("aid"); $_t = new ParticipantAnswerTable(); $_t->vote($_voteId, $_answerId, $this->_participant->id); $this->_redirect(APPLICATION_BASEURL_INDEX . "/participant/subscriptions"); }
/** * * * @return null if participant is not voted yet or Answer object */ public function isVotedBy($participantId) { $_t = new ParticipantAnswerTable(); return $_t->findParticipantAnswerForVote($participantId, $this->id); }