Create block placeholder

[MAILPOET-3638]
This commit is contained in:
Jan Lysý
2021-06-04 13:55:50 +02:00
committed by Veljko V
parent 3aa84cf9c1
commit 4d5801caa3
3 changed files with 35 additions and 1 deletions

View File

@@ -34,6 +34,9 @@ class Renderer {
/** @var Text */
private $text;
/** @var Placeholder */
private $placeholder;
public function __construct(
AutomatedLatestContentBlock $ALC,
Button $button,
@@ -43,7 +46,8 @@ class Renderer {
Image $image,
Social $social,
Spacer $spacer,
Text $text
Text $text,
Placeholder $placeholder
) {
$this->ALC = $ALC;
$this->button = $button;
@@ -54,6 +58,7 @@ class Renderer {
$this->social = $social;
$this->spacer = $spacer;
$this->text = $text;
$this->placeholder = $placeholder;
}
public function render(NewsletterEntity $newsletter, $data) {
@@ -113,6 +118,8 @@ class Renderer {
return $this->spacer->render($block);
case 'text':
return $this->text->render($block);
case 'placeholder':
return $this->placeholder->render($block);
}
return "<!-- Skipped unsupported block type: {$block['type']} -->";
}