function user_badges_rules_action_info in User Badges 7.3
Same name and namespace in other branches
- 6.2 user_badges.rules.inc \user_badges_rules_action_info()
- 6 user_badges.rules.inc \user_badges_rules_action_info()
- 7.4 user_badges.rules.inc \user_badges_rules_action_info()
Implements hook_rules_action_info() on behalf of the user_badges module.
File
- ./
user_badges.rules.inc, line 7
Code
function user_badges_rules_action_info() {
$items = array(
'add_badge_by_name' => array(
'label' => t('Add badge by name'),
'base' => 'user_badges_rules_action_add_badge_by_name',
'parameter' => array(
'badge' => array(
'type' => 'text',
'label' => t('Badge name'),
'options list' => 'user_badges_rules_get_badge_names',
'restriction' => 'input',
),
'user' => array(
'type' => 'user',
'label' => t('User on whose behalf to add the badge'),
),
),
'group' => t('User'),
'access_callback' => 'user_badges_rules_integration_access',
),
'remove_badge_by_name' => array(
'label' => t('Remove badge by name'),
'base' => 'user_badges_rules_action_remove_badge_by_name',
'parameter' => array(
'badge' => array(
'type' => 'text',
'label' => t('Badge name'),
'options list' => 'user_badges_rules_get_badge_names',
'restriction' => 'input',
),
'user' => array(
'type' => 'user',
'label' => t('User on whose behalf to add the badge'),
),
),
'group' => t('User'),
'access_callback' => 'user_badges_rules_integration_access',
),
);
return $items;
}