function voting_rules_rules_condition_info in Voting Rules 6
Same name and namespace in other branches
- 7 voting_rules.rules.inc \voting_rules_rules_condition_info()
Implementation of hook_rules_condition_info().
File
- ./
voting_rules.rules.inc, line 114 - Provides Rules integration for the Votingapi module
Code
function voting_rules_rules_condition_info() {
foreach (voting_rules_content_types() as $content_type) {
$conditions['voting_rules_condition_check_vote_value_' . $content_type] = array(
'label' => t('Check the value of the vote on a @type', array(
'@type' => $content_type,
)),
'arguments' => array(
'vote' => array(
'type' => 'vote',
'label' => t('Vote'),
),
$content_type => array(
'type' => $content_type,
'label' => ucwords($content_type) . ' being voted on',
),
),
'module' => 'Votingapi',
);
$conditions['voting_rules_condition_check_vote_tag_' . $content_type] = array(
'label' => t('Check the tag of a vote on a @type', array(
'@type' => $content_type,
)),
'arguments' => array(
'vote' => array(
'type' => 'vote',
'label' => t('Vote'),
),
$content_type => array(
'type' => $content_type,
'label' => ucwords($content_type) . ' being voted on',
),
),
'module' => 'Votingapi',
);
$conditions['voting_rules_condition_check_results_' . $content_type] = array(
'label' => t('Evaluate the results of a vote on a @type', array(
'@type' => $content_type,
)),
'arguments' => array(
'vote_results' => array(
'type' => 'vote_results',
'label' => t('Results of the Vote'),
),
$content_type => array(
'type' => $content_type,
'label' => ucwords($content_type) . ' being voted on',
),
),
'module' => 'Votingapi',
);
}
return $conditions;
}