has() public method

has log
public has ( string $targetId, Xpressengine\User\UserInterface $user = null, string $option = '' ) : boolean
$targetId string target id
$user Xpressengine\User\UserInterface user instance
$option string counter option
return boolean
Esempio n. 1
0
 /**
  * has vote
  *
  * @param Board         $board  board model
  * @param UserInterface $user   user
  * @param string        $option 'assent' or 'dissent'
  * @return bool
  */
 public function hasVote(Board $board, $user, $option)
 {
     return $this->voteCounter->has($board->id, $user, $option);
 }