function drush_votingapi_generate_votes in Voting API 8.3
Same name and namespace in other branches
- 7.3 votingapi.drush.inc \drush_votingapi_generate_votes()
- 7.2 votingapi.drush.inc \drush_votingapi_generate_votes()
Command callback. Generate a number of votes.
File
- ./
votingapi.drush.inc, line 92 - Voting API module integration with Drush 8 and earlier.
Code
function drush_votingapi_generate_votes($entity_type = 'node', $vote_type = 'percent') {
$options = [
'kill_votes' => drush_get_option('kill_votes'),
'age' => drush_get_option('age'),
'node_types' => drush_get_option('node_types'),
];
votingapi_generate_votes($entity_type, $vote_type, $options);
drush_log(dt('Generated @vtype votes for @etype entities.', [
'@vtype' => $vote_type,
'@etype' => $entity_type,
]), 'success');
}