function voting_rules_rules_action_info in Voting Rules 6
Implementation of hook_rules_action_info().
File
- ./
voting_rules.rules.inc, line 278 - Provides Rules integration for the Votingapi module
Code
function voting_rules_rules_action_info() {
foreach (voting_rules_content_types() as $content_type) {
$actions['voting_rules_action_cast_vote_' . $content_type] = array(
'label' => t('Cast Vote on a @type', array(
'@type' => $content_type,
)),
'arguments' => array(
$content_type => array(
'type' => $content_type,
'label' => t("The @type being voted on", array(
'@type' => $content_type,
)),
),
),
'module' => 'Votingapi',
);
}
$actions['voting_rules_action_load_votes'] = array(
'label' => t('Load Votes'),
'arguments' => array(),
'new variables' => array(
'votes_loaded' => array(
'type' => 'votes',
'label' => t('Votes Loaded from Database'),
'save' => TRUE,
'label callback' => 'voting_rules_action_load_votes_variable_label',
),
),
'module' => 'Votingapi',
);
return $actions;
}