You are here

public function RelationsActivity::construct in Heartbeat 7

Fake constructor to hook this method instead of the constructor.

Overrides HeartbeatStream::construct

File

modules/heartbeat_defaults/streams/relationsactivity.inc, line 18
User relations activity object.

Class

RelationsActivity
Class RelationsActivity Concrete class to build a stream with activity messages for all users that are connected to the viewed user.

Code

public function construct() {

  // Add the relations to the viewed user object.
  $this->viewer->relations = heartbeat_related_uids($this->viewer->uid);

  // This stream needs the viewed relations as well. Load them if different.
  if ($this->viewed->uid != $this->viewer->uid) {
    $this->viewed->relations = heartbeat_related_uids($this->viewed->uid);
  }
  else {
    $this->viewed->relations = $this->viewer->relations;
  }
}