public function UserActivity::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 object by reference to add our part to the query:
Overrides HeartbeatStream::viewsQueryAlter
File
- modules/
heartbeat_defaults/ streams/ useractivity.inc, line 30 - Personal/private heartbeat activity access object
Class
- UserActivity
- Class PrivateHeartbeat Concrete class to prepare messages for the current user only
Code
public function viewsQueryAlter(&$view) {
$views->query
->condition(db_or()
->condition('ha.uid', $this->viewed->uid)
->condition(db_and()
->condition('ha.uid_target', $this->viewed->uid)
->condition('ha.access', HEARTBEAT_PRIVATE, '>')));
}