You are here

function heartbeat_activity_load_multiple in Heartbeat 7

Load multiple activity records by user activity ID's.

3 calls to heartbeat_activity_load_multiple()
HeartbeatStream::executeQuery in includes/heartbeatstream.inc
executeQuery
HeartbeatStream::executeViews in includes/heartbeatstream.inc
executeViews().
_heartbeat_activity_load in ./heartbeat.module
Function to load one activity message.

File

./heartbeat.module, line 1034
Module file for heartbeat activity. Basic hook implementations and helper functions will be found here.

Code

function heartbeat_activity_load_multiple($uaids = array(), $conditions = array()) {
  $entities = entity_load('heartbeat_activity', $uaids, $conditions);
  $activities = array();
  foreach ($uaids as $uaid) {
    if (isset($entities[$uaid]) && ($template = heartbeat_message_template_load($entities[$uaid]->message_id))) {
      $message = new HeartbeatActivity($entities[$uaid], $template);
      $message->count = 1;
      $activities[$uaid] = $message;
      HeartbeatMessagePool::getInstance()
        ->addMessage($message);
    }
  }
  return $activities;
}