public function Mongodb_VoteStorage::deleteVotes in Voting API 8.3
Same name and namespace in other branches
- 7.3 votingapi.api.php \Mongodb_VoteStorage::deleteVotes()
Deletes votes from the database.
Parameters
$votes: An array of VotingApi_Vote instances to delete. Minimally, each vote must have the 'vote_id' key set.
$vids: A list of the 'vote_id' values from $votes.
File
- ./
votingapi.api.php, line 167 - Provides hook documentation for the VotingAPI module.
Class
Code
public function deleteVotes($votes, $vids) {
mongodb_collection('votingapi_vote')
->delete([
'vote_id' => [
'$in' => array_map('intval', $vids),
],
]);
}