You are here

public function HeartbeatMessageTemplate::setRoles in Heartbeat 7

Sets the roles

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

File

includes/heartbeatmessagetemplate.inc, line 133
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 setRoles($roles = array()) {

  // Filter the roles out of the arguments
  if (!empty($roles) && is_array($roles)) {
    foreach ($roles as $rid) {
      if ($rid != 0) {
        $this->roles[$rid] = $rid;
      }
    }
  }
}