You are here

protected function RelationsActivity::queryAlter in Heartbeat 7

Implementation of queryAlter().

Overrides HeartbeatStream::queryAlter

File

modules/heartbeat_defaults/streams/relationsactivity.inc, line 36
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

protected function queryAlter() {

  // This stream is limited to the messages owned by the "viewed" user
  // and his/her relations (friends, fans, ...).
  $this->query
    ->condition('ha.access', HEARTBEAT_PUBLIC_TO_ADDRESSEE, '>=');
  $this->query
    ->condition('ha.uid', $this->viewed->relations, 'IN');
}