| 1 field_group.module | field_group_exists($group_name, $entity_type, $bundle, $mode) |
Checks if a field_group exists in required context.
Parameters
string $group_name: The name of the group.
string $entity_type: The name of the entity.
string $bundle: The bundle for the entity.
string $mode: The view mode context the group will be rendered.
Return value
bool: TRUE if group exists, FALSE otherwise.
File
- core/
modules/ field_group/ field_group.module, line 816 - Field Group module.
Code
function field_group_exists($group_name, $entity_type, $bundle, $mode) {
$groups = field_group_read_groups();
return !empty($groups[$entity_type][$bundle][$mode][$group_name]);
}