You are here

public function HeartbeatMessageTemplate::setVariables in Heartbeat 7

Sets the variables array Data variables are stored in an array to use them to build real variables. this means that when activity message objects get merged, the variables will be filled with variables components from all instances.

1 call to HeartbeatMessageTemplate::setVariables()
HeartbeatMessageTemplate::init in includes/heartbeatmessagetemplate.inc
init().

File

includes/heartbeatmessagetemplate.inc, line 161
HeartbeatMessageTemplate Template object that holds configuration for a message template. A HeartbeatActivity object will be able to have the template as composite.

Class

HeartbeatMessageTemplate
Class HeartbeatMessageTemplate

Code

public function setVariables($variables = NULL) {
  if (!empty($variables)) {
    if (is_string($variables)) {
      $this->variables = heartbeat_decode_message_variables($variables);
    }
    elseif (is_array($variables)) {
      $this->variables = $variables;
    }
  }
}