Exemplo n.º 1
0
 /**
  * Internal function to return an email template object from a row.
  * @param $row array
  * @return BaseEmailTemplate
  */
 function &_returnBaseEmailTemplateFromRow(&$row)
 {
     $emailTemplate = new BaseEmailTemplate();
     $emailTemplate->setEmailId($row['email_id']);
     $emailTemplate->setAssocType($row['assoc_type']);
     $emailTemplate->setAssocId($row['assoc_id']);
     $emailTemplate->setEmailKey($row['email_key']);
     $emailTemplate->setEnabled($row['enabled'] == null ? 1 : $row['enabled']);
     $emailTemplate->setCanDisable($row['can_disable']);
     $emailTemplate->setFromRoleId($row['from_role_id']);
     $emailTemplate->setToRoleId($row['to_role_id']);
     HookRegistry::call('EmailTemplateDAO::_returnBaseEmailTemplateFromRow', array(&$emailTemplate, &$row));
     return $emailTemplate;
 }
Exemplo n.º 2
0
 /**
  * Constructor.
  */
 function EmailTemplate()
 {
     parent::BaseEmailTemplate();
 }
 /**
  * Set variables array
  *
  * @param mixed $value
  * @return mixed
  */
 function setVariables($value)
 {
     if (is_array($value)) {
         return parent::setVariables(implode("\n", $value));
     } else {
         return parent::setVariables($value);
     }
     // if
 }
Exemplo n.º 4
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     EmailTemplatePeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new EmailTemplatePeer();
     }
     return self::$peer;
 }
 /**
  * Constructor.
  */
 function __construct()
 {
     parent::__construct();
 }