protected function MigrateDestinationVotingApiVote::recalculateResults in Voting API 7.3
Same name and namespace in other branches
- 7.2 votingapi.migrate.inc \MigrateDestinationVotingApiVote::recalculateResults()
Recalculate votes for a list of id's.
Parameters
string $entity_type: The entity type of the id's
array $ids: List of the ID's for which votes are to be recalculated.
2 calls to MigrateDestinationVotingApiVote::recalculateResults()
- MigrateDestinationVotingApiVote::import in ./
votingapi.migrate.inc - Derived classes must implement import(), to construct one new object (pre-pppulated using field mappings in the Migration). It is expected to call prepare and complete handlers, passing them $row (the raw data from the source).
- MigrateDestinationVotingApiVote::postImport in ./
votingapi.migrate.inc - We're done with importing votes, recalculate the results.
File
- ./
votingapi.migrate.inc, line 125 - Migration support for voting api.
Class
- MigrateDestinationVotingApiVote
- @file Migration support for voting api.
Code
protected function recalculateResults($entity_type, array $ids) {
foreach ($ids as $entity_id) {
votingapi_recalculate_results($entity_type, $entity_id, TRUE);
}
}