You are here

public function PollStorage::cancelVote in Poll 8

Cancel a user's vote.

Parameters

PollInterface $poll:

AccountInterface $account:

Return value

mixed

Overrides PollStorageInterface::cancelVote

Deprecated

in Drupal 8.x-1.0. Use \Drupal\poll\PollVoteStorageInterface::cancelVote() instead.

See also

\Drupal\poll\PollVoteStorageInterface::cancelVote()

File

src/PollStorage.php, line 54

Class

PollStorage
Controller class for polls.

Namespace

Drupal\poll

Code

public function cancelVote(PollInterface $poll, AccountInterface $account = NULL) {
  \Drupal::service('poll_vote.storage')
    ->cancelVote($poll, $account);
}