public static embedAndModifyCss ( $string, null $document = null ) : mixed | ||
$string | ||
$document | null | |
return | mixed |
/** * Replaces the placeholders with the content and returns the rendered Html * * @return string|null */ public function getBodyHtmlRendered() { $html = $this->getBodyHtml(); //if the content was manually set with $obj->setBodyHtml(); this content will be used //and not the content of the Document! if ($html instanceof \Zend_Mime_Part) { $rawHtml = $html->getRawContent(); $content = $this->placeholderObject->replacePlaceholders($rawHtml, $this->getParams(), $this->getDocument(), $this->getEnableLayoutOnPlaceholderRendering()); } elseif ($this->getDocument() instanceof Model\Document) { $content = $this->placeholderObject->replacePlaceholders($this->getDocument(), $this->getParams(), $this->getDocument(), $this->getEnableLayoutOnPlaceholderRendering()); } else { $content = null; } //modifying the content e.g set absolute urls... if ($content) { $content = MailHelper::embedAndModifyCss($content, $this->getDocument()); $content = MailHelper::setAbsolutePaths($content, $this->getDocument(), $this->getHostUrl()); } return $content; }