You are here

function hook_heartbeat_template_info in Heartbeat 7

Register heartbeat templates.

See also

hook_ctools_plugin_api.

2 functions implement hook_heartbeat_template_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

heartbeat_defaults_heartbeat_template_info in modules/heartbeat_defaults/heartbeat_defaults.heartbeat.inc
Implements hook_heartbeat_template_info().
heartbeat_og_heartbeat_template_info in modules/heartbeat_og/heartbeat_og.heartbeat.inc
Implements hook_heartbeat_template_info().

File

./heartbeat.api.php, line 93
Hooks provided by the Heartbeat API.

Code

function hook_heartbeat_template_info() {
  $heartbeatmessagetemplates = array();
  $heartbeatmessagetemplate = new HeartbeatMessageTemplate();
  $heartbeatmessagetemplate->disabled = FALSE;

  /* Edit this to true to make a default heartbeatmessagetemplate disabled initially */
  $heartbeatmessagetemplate->api_version = 1;
  $heartbeatmessagetemplate->message_id = 'heartbeat_add_node';
  $heartbeatmessagetemplate->description = 'User adds a node, save user activity';
  $heartbeatmessagetemplate->message = '!username has added !node_type !node_title.';
  $heartbeatmessagetemplate->message_concat = '!username has added the following !types: %node_title%.';
  $heartbeatmessagetemplate->perms = TRUE;
  $heartbeatmessagetemplate->group_type = 'summary';
  $heartbeatmessagetemplate->concat_args = array(
    'group_by' => 'user',
    'group_target' => 'node_title',
    'group_num_max' => '4',
    'merge_separator' => ',',
    'merge_end_separator' => 'and',
  );
  $heartbeatmessagetemplate->variables = array(
    'username' => '',
    'node_type' => '',
    'node_title' => '',
    'types' => '',
  );
  $heartbeatmessagetemplate->attachments = array();
  $heartbeatmessagetemplates['heartbeat_add_node'] = $heartbeatmessagetemplate;
  return $heartbeatmessagetemplates;
}