You are here

public function NodeActivity::viewsQueryAlter in Heartbeat 7

Function to add a part of a sql to a query built by views UI

Parameters

object $view: The view handler by reference to add our part to the query.

Overrides HeartbeatStream::viewsQueryAlter

File

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

Class

NodeActivity
Class NodeActivity Stream with all activity related to nodes.

Code

public function viewsQueryAlter(&$view) {
  $views->query
    ->condition('ha.access', 0, '>')
    ->condition(db_or()
    ->condition('ha.nid', $this->nid)
    ->condition('ha.nid_target', $this->nid));
}