public function onRender() { $this->lastestPoll = $this->page['lastestPoll'] = Poll::getLatestPoll($this->property('poll') == 0 ? Poll::getLatestPollId() : $this->property('poll')); $this->lastestPollAnswers = $this->page['lastestPollAnswers'] = Poll::getLatestPollAnswers($this->property('poll') == 0 ? Poll::getLatestPollId() : $this->property('poll')); $this->checkIfVote = $this->page['checkIfVote'] = Votes::checkIfVote($this->request->getClientIp(), $this->property('poll') == 0 ? Poll::getLatestPollId() : $this->property('poll')); }