You are here

public function HeartbeatMessageBuilder::execute in Heartbeat 6.3

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

File

includes/heartbeatmessagebuilder.inc, line 52
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 execute() {
  $heartbeat = $this->_heartbeatState
    ->fetchMessages();
  if (!empty($heartbeat->raw_messages)) {
    return $this
      ->group($heartbeat);
  }
  return array();
}