public function filterByGroup(&$items, $item = false, $params = array())
{
foreach (array('page', 'where', 'not_empty') as $key) {
isset($params[$key]) || ($params[$key] = false);
}
$sections = $this->_getFieldgroups($params['page'], $item, $params['where'], $items, $params);
if ($params['not_empty']) {
if ($sections) {
foreach ($sections as $section) {
if (isset($section['fields']) && $section['fields'] && is_array($section['fields'])) {
foreach ($section['fields'] as $field) {
if (isset($items[$field['name']]) && $items[$field['name']]) {
return $sections;
}
}
}
}
}
return false;
}
return $sections;
}