You are here

function hook_votingapi_storage_add_vote in Voting API 7.2

Save a vote in the database.

Parameters

$vote: See votingapi_add_votes() for the structure of this array, with the defaults loaded from votingapi_prep_vote().

1 function implements hook_votingapi_storage_add_vote()

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_add_vote in ./votingapi.module
Implements of hook_votingapi_storage_add_vote().

File

./votingapi.api.php, line 132
Provides hook documentation for the VotingAPI module.

Code

function hook_votingapi_storage_add_vote(&$vote) {
  _mongodb_votingapi_prepare_vote($vote);
  mongodb_collection('votingapi_vote')
    ->insert($vote);
}