You are here

public function Poll::hasUserVoted in Poll 8

@todo: Refactor - doesn't belong here.

Return value

mixed

Overrides PollInterface::hasUserVoted

File

src/Entity/Poll.php, line 384

Class

Poll
Defines the poll entity class.

Namespace

Drupal\poll\Entity

Code

public function hasUserVoted() {

  /** @var \Drupal\poll\PollVoteStorage $vote_storage */
  $vote_storage = \Drupal::service('poll_vote.storage');
  return $vote_storage
    ->getUserVote($this);
}