drush_votingapi_generate_votes
Drupal 7 drush_votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent')
Command callback. Generate a number of votes.
File
- sites/
all/ modules/ votingapi/ votingapi.drush.inc, line 64 - Generate votingapi votes, recalculate results for existing votes, or flush VotingAPI data entirely.
Code
function drush_votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent') {
$options = array(
'kill' => drush_get_option('kill'),
'age' => drush_get_option('age'),
'types' => drush_get_option('types'),
);
votingapi_generate_votes($entity_type, $vote_type, $options);
drush_log(t('Generating @vtype votes for @etype entities.', array('@vtype' => $vote_type, '@etype' => $entity_type)), 'success');
}

