You are here

function heartbeat_stream_load in Heartbeat 6.4

Helper function to load a heartbeat stream / access type

7 calls to heartbeat_stream_load()
HeartbeatAccess::resultSql in includes/heartbeataccess.inc
resultSql
HeartbeatAdminTools::testImport in tests/heartbeat.admintools.test
Tests if a heartbeat message templates are imported correct.
heartbeat_activity_stream_clone_submit in ./heartbeat.admin.inc
Submit functon to clone a stream.
SingleHeartbeat::resultSql in includes/singleheartbeat.inc
resultSql
views_handler_filter_heartbeat_access::query in views/handlers/views_handler_filter_heartbeat_access.inc
Adding things to query object

... See full list

File

./heartbeat.module, line 1761

Code

function heartbeat_stream_load($access_type) {
  if (is_string($access_type)) {
    $access_types = variable_get('heartbeat_access_types', array());
    foreach ($access_types as $type) {
      $realname = drupal_strtolower(isset($type['realname']) ? $type['realname'] : $type['class']);
      if ($realname == drupal_strtolower($access_type)) {
        return $type;
      }
    }
  }
  return NULL;
}