You are here

public function PollVoteStorage::deleteChoicesVotes in Poll 8

Delete a user's votes for a poll choice.

Parameters

array $choices: A list of choice ID's for each one we will remove all the votes.

Overrides PollVoteStorageInterface::deleteChoicesVotes

File

src/PollVoteStorage.php, line 51

Class

PollVoteStorage
Controller class for poll vote storage.

Namespace

Drupal\poll

Code

public function deleteChoicesVotes(array $choices) {
  $this->connection
    ->delete('poll_vote')
    ->condition('chid', $choices, 'IN')
    ->execute();
}