function menu_badges_flatten_options in Menu Badges 7
Flatten menu badges array.
Parameters
$badges:
1 call to menu_badges_flatten_options()
- menu_badges_get_badge_options in ./
menu_badges.module - Get all menu badge options suitable for a select.
File
- ./
menu_badges.module, line 163 - Menu Badges module file.
Code
function menu_badges_flatten_options($badges) {
$flattened = array();
foreach ($badges as $key => $definition) {
$flattened[$definition['module_name']][$key] = $definition['label'];
}
return $flattened;
}