function spaces_og_spaces_get_space_from_object in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces_og/spaces_og.module \spaces_og_spaces_get_space_from_object()
Implementation of hook_spaces_get_space_from_object().
File
- spaces_og/
spaces_og.module, line 562
Code
function spaces_og_spaces_get_space_from_object($type, $object) {
if ($type == 'node') {
if (og_is_group_type($object->type)) {
return spaces_load('og', $object->nid);
}
elseif (!empty($object->og_groups)) {
reset($object->og_groups);
return spaces_load('og', current($object->og_groups));
}
}
}