function heartbeat_message_activity in Heartbeat 6.4
Same name and namespace in other branches
- 7 heartbeat.pages.inc \heartbeat_message_activity()
Page callback for one activity message.
1 string reference to 'heartbeat_message_activity'
- heartbeat_menu in ./
heartbeat.module - Implementation of hook_menu().
File
- ./
heartbeat.pages.inc, line 82 - Separate codefile for page displays
Code
function heartbeat_message_activity($uaid) {
$output = '';
// Message streams for each access type
$context = heartbeat_stream_view('singleheartbeat', TRUE);
if (!isset($context)) {
return t('No message found.');
}
$heartbeataccess = $context
->getState();
$heartbeataccess->stream->latest_uaid = $uaid;
$context
->updateState($heartbeataccess);
// Get the message
$messages = $context
->execute();
if ($context
->hasErrors()) {
drupal_set_message(implode('<br />', $context
->getErrors()), 'warning');
}
$heartbeataccess = $context
->getState();
if (count($messages) == 0) {
drupal_access_denied();
exit;
}
$output = theme('heartbeat_list', $messages, $heartbeataccess, '');
return $output;
}