function voting_rules_token_values in Voting Rules 6
Implementation of hook_token_values().
File
- ./
voting_rules.module, line 59 - Provides Rules intregration for the Votingapi module
Code
function voting_rules_token_values($type, $object = NULL, $options = array()) {
$tokens = array();
if ($type == 'vote' || $type == 'all') {
$tokens = $object;
}
elseif ($type == 'vote_results' || $type == 'all') {
foreach ($object as $data) {
$tokens[$data['function']] = $data['value'];
}
}
return $tokens;
}