function skinr_fieldgroup_view in Skinr 6.2
Implementation of hook_fieldgroup_view().
Related topics
File
- modules/
fieldgroup.skinr.inc, line 104 - Provide skinr handling for fieldgroup.module
Code
function skinr_fieldgroup_view($node, &$element, &$group, $context) {
// We need to fake a preprocess to get our skinr data, since these
// renderings of the fieldgroup don't have a preprocess hook.
$exclude = array(
'no_style',
'simple',
'hidden',
);
if (!in_array($group['settings']['display'][$context]['format'], $exclude)) {
$vars = array(
'element' => $element,
);
$vars['element']['#group_name'] = $group['group_name'];
$vars['element']['#node'] = $node;
skinr_preprocess($vars, 'fieldgroup_fieldset');
if ($vars['skinr']) {
$element['#attributes']['class'] .= ' ' . $vars['skinr'];
}
}
}