You are here

public function HeartbeatMessageBuilder::__construct in Heartbeat 6.3

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

File

includes/heartbeatmessagebuilder.inc, line 33
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 __construct(HeartbeatAccess $heartbeatState) {
  if (!$heartbeatState
    ->hasErrors()) {
    $this->_heartbeatState = $heartbeatState;
  }
  else {
    $this
      ->setError($heartbeatState
      ->getErrors());
  }
}