public static function VotingApi_Vote::deleteMultiple in Voting API 7.3
Delete votes from the database.
Parameters
$votes An array of votes to delete. Each vote must have the 'vote_id' key set.:
1 call to VotingApi_Vote::deleteMultiple()
- VotingApi_Criteria::delete in ./
votingapi.module - Delete all matching votes.
File
- ./
votingapi.module, line 68 - A generalized voting API for Drupal.
Class
- VotingApi_Vote
- Model class for votingapi_vote table.
Code
public static function deleteMultiple($votes = array()) {
if (!empty($votes)) {
module_invoke_all('votingapi_delete', $votes);
$vids = array();
foreach ($votes as $vote) {
$vids[] = $vote->vote_id;
}
VotingApi_VoteStorage::get()
->deleteVotes($votes, $vids);
}
}