You are here

public function NodeActivity::construct in Heartbeat 7

Implements construct().

Overrides HeartbeatStream::construct

File

modules/heartbeat_defaults/streams/nodeactivity.inc, line 37

Class

NodeActivity
Class NodeActivity Stream with all activity related to nodes.

Code

public function construct() {

  // 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']['nid'])) {
    $this
      ->setNid($_GET['contextualArguments']['nid']);
  }
  elseif (arg(0) == "node" && is_numeric(arg(1))) {
    $this
      ->setNid(arg(1));
  }
}