function voting_rules_rules_data_info_alter in Voting Rules 7
Implemnts hook_rules_data_info_alter().
File
- ./
voting_rules.rules.inc, line 125 - Provides Rules integration for the Voting API module.
Code
function voting_rules_rules_data_info_alter(&$data_info) {
$entity_types = voting_rules_get_types();
foreach ($entity_types as $entity_type => $label) {
if (isset($data_info[$entity_type])) {
$data_info[$entity_type]['property info']['votes'] = array(
'label' => t('Vote'),
'description' => t('The vote.'),
'type' => 'list<vote>',
'getter callback' => 'voting_rules_get_votes',
);
$data_info[$entity_type]['property info']['vote_results'] = array(
'label' => t('Vote results'),
'description' => t('The vote results.'),
'type' => 'vote_results',
'wrap' => TRUE,
'getter callback' => 'voting_rules_get_vote_results',
);
}
}
}