function user_badges_rules_event_info in User Badges 7.3
Same name and namespace in other branches
- 6.2 user_badges.rules.inc \user_badges_rules_event_info()
- 6 user_badges.rules.inc \user_badges_rules_event_info()
- 7.4 user_badges.rules.inc \user_badges_rules_event_info()
Implements hook_rules_event_info().
File
- ./
user_badges.rules.inc, line 53
Code
function user_badges_rules_event_info() {
$variables = array(
'user' => array(
'type' => 'user',
'label' => t('User before receiving badge'),
),
'badge_id' => array(
'type' => 'text',
'label' => t('The given Badge\'s ID'),
),
);
$items = array(
'user_badges_badge_given' => array(
'group' => t('User'),
'label' => t('User was given a badge'),
'variables' => $variables,
'access callback' => 'user_badges_rules_integration_access',
),
'user_badges_badge_removed' => array(
'group' => t('User'),
'label' => t('User was removed a badge'),
'variables' => $variables,
'access callback' => 'user_badges_rules_integration_access',
),
);
return $items;
}