You are here

public function MigrateDestinationVotingApiVote::bulkRollback in Voting API 7.2

Same name and namespace in other branches
  1. 7.3 votingapi.migrate.inc \MigrateDestinationVotingApiVote::bulkRollback()

Delete the provided votes and recalculate the results.

Parameters

array $ids: ID's to be deleted.

File

./votingapi.migrate.inc, line 145
Migration support for voting api.

Class

MigrateDestinationVotingApiVote
@file Migration support for voting api.

Code

public function bulkRollback(array $ids) {
  migrate_instrument_start(__METHOD__);
  foreach ($ids as $id) {
    $votes[]['vote_id'] = $id;
  }
  votingapi_delete_votes($votes);
  migrate_instrument_stop(__METHOD__);
}