function calendar_og_groups in Calendar 5
Same name and namespace in other branches
- 5.2 calendar.module \calendar_og_groups()
- 6.2 calendar.module \calendar_og_groups()
- 7 calendar.module \calendar_og_groups()
- 7.2 calendar.module \calendar_og_groups()
Helper function to figure out a group gid to use in blocks.
@todo this may need more work.
Return value
an array of group nodes that are relevant.
1 call to calendar_og_groups()
- calendar_views_query_alter in ./
calendar.module - Implementation of hook_views_query() Insert filters into the query based on the current calendar view and the selected fields Used when the actual view arguments don't provide enough info to construct the query. i.e. on a view with no arguments…
File
- ./
calendar.module, line 1463 - Adds calendar filtering and displays to Views.
Code
function calendar_og_groups($view) {
if (!($groupnode = og_get_group_context())) {
global $user;
$groupnodes = array_keys($user->og_groups);
}
else {
$groupnodes = array(
$groupnode->nid,
);
}
return $groupnodes;
}