You are here

function user_badges_rules_event_info in User Badges 6.2

Same name and namespace in other branches
  1. 6 user_badges.rules.inc \user_badges_rules_event_info()
  2. 7.4 user_badges.rules.inc \user_badges_rules_event_info()
  3. 7.3 user_badges.rules.inc \user_badges_rules_event_info()

Implementation of hook_rules_event_info().

File

./user_badges.rules.inc, line 10
Provide better integration into the rules module

Code

function user_badges_rules_event_info() {
  return array(
    'user_badges_badge_given' => array(
      'label' => t('User was given a badge'),
      'arguments' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('User before receiving badge'),
        ),
        'badge_id' => array(
          'type' => 'value',
          'label' => t('The given Badge\'s ID'),
        ),
      ),
      'module' => 'User Badges',
    ),
    'user_badges_badge_removed' => array(
      'label' => t('User was removed a badge'),
      'arguments' => array(
        'user' => array(
          'type' => 'user',
          'label' => t('User before removing badge'),
        ),
        'badge_id' => array(
          'type' => 'value',
          'label' => t('The removed Badge\'s ID'),
        ),
      ),
      'module' => 'User Badges',
    ),
  );
}