function hook_votingapi_storage_delete_votes in Voting API 7.2
Delete votes from the database.
Parameters
$votes: An array of votes to delete. Minimally, each vote must have the 'vote_id' key set.
$vids: A list of the 'vote_id' values from $voes.
1 function implements hook_votingapi_storage_delete_votes()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- votingapi_votingapi_storage_delete_votes in ./
votingapi.module - Implements of hook_votingapi_storage_delete_votes().
File
- ./
votingapi.api.php, line 146 - Provides hook documentation for the VotingAPI module.
Code
function hook_votingapi_storage_delete_votes($votes, $vids) {
mongodb_collection('votingapi_vote')
->delete(array(
'vote_id' => array(
'$in' => array_map('intval', $vids),
),
));
}