public function voteup($voter)
    {
        //first check if we have voted down if yes then just remove that
        if ($votedown = $this->votedowns->getQuery(true)
                                        ->disableChain()
                                        ->voter($voter)
                                        ->fetch()
        ) {
            $votedown->delete();
        } else {
            //find ore create a voteup
            $voteup = $this->voteups->addNew(array('voter' => $voter, 'votee' => $this));
            //if the votee is suscribable then subscribe the voter
            if ($this->isSubscribable() && !$this->subscribed($voter)) {
                $this->addSubscriber($voter);
            }
            $this->_mixer->execute('after.voteup', new AnCommandContext(array('vote' => $voteup)));
        }
    }
public function voteup($voter)
    {
        //first check if we have voted down if yes then just remove that
        if ($votedown = $this->votedowns->getQuery(true)
                                        ->disableChain()
                                        ->voter($voter)
                                        ->fetch()
        ) {
            $votedown->delete();
        } else {
            //find ore create a voteup
            $voteup = $this->voteups->addNew(array('voter' => $voter, 'votee' => $this));
            //if the votee is suscribable then subscribe the voter
            if ($this->isSubscribable() && !$this->subscribed($voter)) {
                $this->addSubscriber($voter);
            }
            $this->_mixer->execute('after.voteup', new AnCommandContext(array('vote' => $voteup)));
        }
    }
public function voteup ( $ voter ) { //first check if we have voted down if yes then just remove that if ( $ votedown = $ this -> votedowns -> getQuery ( true ) -> disableChain ( ) -> voter ( $ voter ) -> fetch ( ) ) { $ votedown -> delete ( ) ; } else { //find ore create a voteup $ voteup = $ this -> voteups -> addNew ( array ( 'voter' => $ voter , 'votee' => $ this ) ) ; //if the votee is suscribable then subscribe the voter if ( $ this -> isSubscribable ( ) && ! $ this -> subscribed ( $ voter ) ) { $ this -> addSubscriber ( $ voter ) ; } $ this -> _mixer -> execute ( 'after.voteup' , new AnCommandContext ( array ( 'vote' => $ voteup ) ) ) ; } }
Vote up an entity.

@param ComPeopleDomainEntityPerson $voter The voter
Vote up an entity .