Render image block on front end

[MAILPOET-2750]
This commit is contained in:
Rostislav Wolny
2020-04-02 10:53:27 +02:00
committed by Veljko V
parent 868a1aaaa6
commit 7a604fa10e
6 changed files with 176 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ use MailPoet\Form\Block\Date;
use MailPoet\Form\Block\Divider;
use MailPoet\Form\Block\Heading;
use MailPoet\Form\Block\Html;
use MailPoet\Form\Block\Image;
use MailPoet\Form\Block\Paragraph;
use MailPoet\Form\Block\Radio;
use MailPoet\Form\Block\Segment;
@@ -30,6 +31,9 @@ class BlocksRenderer {
/** @var Html */
private $html;
/** @var Image */
private $image;
/** @var Radio */
private $radio;
@@ -67,6 +71,7 @@ class BlocksRenderer {
Date $date,
Divider $divider,
Html $html,
Image $image,
Heading $heading,
Paragraph $paragraph,
Radio $radio,
@@ -82,6 +87,7 @@ class BlocksRenderer {
$this->date = $date;
$this->divider = $divider;
$this->html = $html;
$this->image = $image;
$this->radio = $radio;
$this->segment = $segment;
$this->select = $select;
@@ -103,6 +109,10 @@ class BlocksRenderer {
$html .= $this->heading->render($block);
break;
case 'image':
$html .= $this->image->render($block);
break;
case 'paragraph':
$html .= $this->paragraph->render($block);
break;