/** * Create EmailBody entity object * * @param string $content The body content * @param bool $isHtml Indicate whether the body content is HTML or TEXT * @param bool $persistent Indicate whether this email body can be removed by the email cache manager or not * Set false for external email, and false for system email, for example sent by BAP * @return EmailBody */ public function body($content, $isHtml, $persistent = false) { $result = new EmailBody(); $result->setContent($content)->setBodyIsText(!$isHtml)->setPersistent($persistent); return $result; }
/** * Sets an email body properties * * @param string $content * @param bool $bodyIsText */ public function setEmailBody($content, $bodyIsText) { $this->emailBody = new EmailBody(); $this->emailBody->setContent($content)->setBodyIsText($bodyIsText); }
public function testContentGetterAndSetter() { $entity = new EmailBody(); $entity->setContent('test'); $this->assertEquals('test', $entity->getContent()); }