private function MembersActivity::detectGroup in Heartbeat 7
detectGroup
Detects the group for a given node ID.
1 call to MembersActivity::detectGroup()
- MembersActivity::construct in modules/
heartbeat_og/ streams/ membersactivity.inc - Fake constructor to hook this method instead of the constructor.
File
- modules/
heartbeat_og/ streams/ membersactivity.inc, line 27 - Defines a stream for Member Activity.
Class
- MembersActivity
- Concrete class MembersActivity Defines a stream displaying all activity from members in a group.
Code
private function detectGroup() {
// First check the contextual arguments that could have been sent along
// with ajax posts to get the context of the current node.
if (!empty($_GET['contextualArguments']) && isset($_GET['contextualArguments']['og_etid'])) {
$this
->setGroup($_GET['contextualArguments']['og_etid']);
}
elseif ($og_context = og_context()) {
$this->og_context = $og_context;
if (isset($og_context->etid)) {
$this
->setGroup($og_context->etid);
}
}
}