BxDolVoting::actionVote PHP Méthode

actionVote() public méthode

public actionVote ( )
    public function actionVote()
    {
        if (!$this->isEnabled()) {
            return '{}';
        }
        $iResult = $this->_getVoteResult();
        if ($iResult === false) {
            return '{}';
        }
        if (!$this->makeVote($iResult)) {
            return '{}';
        }
        $this->initVotes();
        echo json_encode(array('rate' => $this->getVoteRate(), 'count' => $this->getVoteCount()));
    }