You are here

protected function HeartbeatMessageBuilder::__construct in Heartbeat 6.4

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

File

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

Class

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

Code

protected function __construct(HeartbeatAccess $heartbeatState) {
  if (!$heartbeatState
    ->hasErrors()) {
    $this->_heartbeatState = $heartbeatState;
  }
  else {
    $this
      ->setError($heartbeatState
      ->getErrors());
  }
}