You are here

public function HeartbeatMessageBuilder::get_instance in Heartbeat 6.4

Get an instance of the correct builder.

1 call to HeartbeatMessageBuilder::get_instance()
heartbeat_stream_view in ./heartbeat.module
Helper function to load a heartbeat stream / access type

File

includes/heartbeatmessagebuilder.inc, line 44
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

public function get_instance(HeartbeatAccess $heartbeatState) {
  if (variable_get('heartbeat_debug', 0)) {
    require_once 'heartbeatmessagebuilderdebug.inc';
    return new HeartbeatMessageBuilderDebug($heartbeatState);
  }
  else {
    return new HeartbeatMessageBuilder($heartbeatState);
  }
}