You are here

public function HeartbeatMessageBuilder::group in Heartbeat 6.3

Same name and namespace in other branches
  1. 6.4 includes/heartbeatmessagebuilder.inc \HeartbeatMessageBuilder::group()

See also

class HeartbeatParser

1 call to HeartbeatMessageBuilder::group()
HeartbeatMessageBuilder::execute in includes/heartbeatmessagebuilder.inc

File

includes/heartbeatmessagebuilder.inc, line 66
Strategy with access behaviour

Class

HeartbeatMessageBuilder
Class HeartbeatMessageBuilder Message builder that fetches and customizes a users activity on the site. The builder takes a heartbeataccess state object to handle the request to fetch the messages.

Code

public function group(HeartbeatParser $heartbeat) {
  $heartbeat
    ->set_timespan_gap(variable_get('heartbeat_activity_grouping_seconds', 720));
  $heartbeat
    ->build_sets($heartbeat->raw_messages);
  $heartbeat
    ->merge_sets();
  $messages = $heartbeat
    ->get_messages();

  //  $messages = $heartbeat->remove_broken_messages();
  return $messages;
}