function Mongodb_VoteStorage::deleteVotes in Voting API 7.3
Same name and namespace in other branches
- 8.3 votingapi.api.php \Mongodb_VoteStorage::deleteVotes()
Delete 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 147 - Provides hook documentation for the VotingAPI module.
Class
Code
function deleteVotes($votes, $vids) {
mongodb_collection('votingapi_vote')
->delete(array(
'vote_id' => array(
'$in' => array_map('intval', $vids),
),
));
}