You are here

final public function HeartbeatStream::getTemplate in Heartbeat 7

getTemplate().

1 call to HeartbeatStream::getTemplate()
HeartbeatStream::executeQuery in includes/heartbeatstream.inc
executeQuery

File

includes/heartbeatstream.inc, line 493
HeartbeatStream object is the object that takes stream configuration to create a stream of activity objects. It is the controlling organ at the pre-query, query and post-query phases.

Class

HeartbeatStream
Abstract class HeartbeatStream This base class has final template methods which are used by the derived concretes. The HeartbeatStream is a state object that is given to the HeartbeatStreamBuilder to set the access to the current request.

Code

public final function getTemplate($template_id, $access = NULL) {
  if (isset($access) && isset($this->templates[$access][$template_id])) {
    return $this->templates[$access][$template_id];
  }
  else {
    foreach ($this->templates as $perm => $templates) {
      if (isset($templates[$template_id])) {
        return $templates[$template_id];
      }
    }
    return NULL;
  }
}