public function MarkupGenerator::generatePreview in Heartbeat 8
Parameters
$url:
Return value
mixed
Overrides Parser::generatePreview
File
- modules/
statusmessage/ src/ MarkupGenerator.php, line 56
Class
- MarkupGenerator
- Class MarkupGenerator.
Namespace
Drupal\statusmessageCode
public function generatePreview() {
if (!$this->parsedMarkup) {
return null;
}
$templateCreator = new TemplateCreator();
$templateCreator
->generateTitle($this->parsedMarkup->title);
$templateCreator
->generateDescription($this->parsedMarkup->description);
$templateCreator
->generateImage($this->parsedMarkup->image);
return $templateCreator
->getPreview();
}