function user_badges_rules_get_badge_names in User Badges 7.3
Same name and namespace in other branches
- 7.4 user_badges.rules.inc \user_badges_rules_get_badge_names()
Function to load badges for options list
Return value
An array of badge names
2 string references to 'user_badges_rules_get_badge_names'
- user_badges_rules_action_info in ./
user_badges.rules.inc - Implements hook_rules_action_info() on behalf of the user_badges module.
- user_badges_rules_condition_info in ./
user_badges.rules.inc - Implementation of hook_rules_condition_info().
File
- ./
user_badges.rules.inc, line 136
Code
function user_badges_rules_get_badge_names() {
//Load the badges by calling this function
$result = user_badges_load_badges();
if ($result
->rowCount()) {
$badges = array();
foreach ($result as $badge) {
$badges[$badge->bid] = $badge->name . ' ' . '(Badge ID:' . ' ' . $badge->bid . ')';
}
}
return $badges;
}