You are here

public function HeartbeatMessageTemplate::setAttachments in Heartbeat 7

Sets the attachments

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

File

includes/heartbeatmessagetemplate.inc, line 107
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 setAttachments($attachments = array()) {
  $this->attachments = array();

  // Strings however should be converted to array
  if (!empty($attachments)) {
    if (is_string($attachments)) {
      $this->attachments = unserialize($attachments);
    }
    elseif (is_array($attachments)) {
      $this->attachments = $attachments;
    }
  }
}