function RulesUICategory::getItemGroup
Returns a group label, e.g. as usable for opt-groups in a select list.
Parameters
array $item_info: The info-array of an item, e.g. an entry of hook_rules_action_info().
bool $in_category: (optional) Whether group labels for grouping inside a category should be return. Defaults to FALSE.
Return value
string|bool The group label to use, or FALSE if none can be found.
1 call to RulesUICategory::getItemGroup()
- RulesUICategory::getOptions in ui/
ui.core.inc - Returns an array of options to use with a select.
File
-
ui/
ui.core.inc, line 1265
Class
- RulesUICategory
- Class holding category related methods.
Code
public static function getItemGroup($item_info, $in_category = FALSE) {
if (isset($item_info['category']) && !$in_category) {
return self::getCategory($item_info, 'label');
}
elseif (!empty($item_info['group'])) {
return $item_info['group'];
}
return FALSE;
}