You are here

public function HeartbeatMessageTemplate::set_variables in Heartbeat 6.4

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.

File

includes/heartbeatmessagetemplate.inc, line 109
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 set_variables($variables = NULL) {
  if (!empty($variables)) {
    if (is_string($variables)) {
      $this->variables = heartbeat_decode_message_variables($variables);
    }
    elseif (is_array($variables)) {
      $this->variables = $variables;
    }
  }
}