You are here

private function heartbeatParser::rebuild_in_groups in Heartbeat 7

Same name and namespace in other branches
  1. 6.4 includes/heartbeatparser.inc \heartbeatParser::rebuild_in_groups()
  2. 6.3 includes/heartbeatparser.inc \heartbeatParser::rebuild_in_groups()

Function to rebuild the messages in groups all sets are handled already

1 call to heartbeatParser::rebuild_in_groups()
heartbeatParser::merge_sets in includes/heartbeatparser.inc
Merges sets of messages to fully formatted messages regenerated at runtime to group settings

File

includes/heartbeatparser.inc, line 317
HeartbeatParser object Parses database messages into a well formed stream of activity messages.

Class

heartbeatParser
Class heartbeatParser

Code

private function rebuild_in_groups() {
  global $base_url;
  $max_items_to_group = variable_get('heartbeat_activity_grouping_how_many', 6);

  // Check the candidates and make the rebuild array
  foreach ($this->_candidates as $single_id => $candidate) {

    // if a candidate exists for this message and it has more than one count
    // Take care!! not message->count because this could be set with the sql as well
    // The purpose would be to fill %times% or its alias %count%
    if ($candidate['count'] > 1) {

      // rebuild the message using the candidate variables
      $this->_messages[$single_id]
        ->create_grouped_message($candidate, $max_items_to_group);
    }
  }
}