Add block renderers to DI container
[MAILPOET-2665]
This commit is contained in:
committed by
Jack Kitterhing
parent
d9b9e13a04
commit
6827eb93e6
@ -4,7 +4,7 @@ namespace MailPoet\Form\Block;
|
||||
|
||||
class Text extends Base {
|
||||
|
||||
public static function render($block) {
|
||||
public function render($block) {
|
||||
$type = 'text';
|
||||
$automationId = ' ';
|
||||
if ($block['id'] === 'email') {
|
||||
@ -14,23 +14,23 @@ class Text extends Base {
|
||||
|
||||
$html = '<p class="mailpoet_paragraph">';
|
||||
|
||||
$html .= static::renderLabel($block);
|
||||
$html .= $this->renderLabel($block);
|
||||
|
||||
$html .= '<input type="' . $type . '" class="mailpoet_text" ';
|
||||
|
||||
$html .= 'name="data[' . static::getFieldName($block) . ']" ';
|
||||
$html .= 'name="data[' . $this->getFieldName($block) . ']" ';
|
||||
|
||||
$html .= 'title="' . static::getFieldLabel($block) . '" ';
|
||||
$html .= 'title="' . $this->getFieldLabel($block) . '" ';
|
||||
|
||||
$html .= 'value="' . static::getFieldValue($block) . '" ';
|
||||
$html .= 'value="' . $this->getFieldValue($block) . '" ';
|
||||
|
||||
$html .= $automationId;
|
||||
|
||||
$html .= static::renderInputPlaceholder($block);
|
||||
$html .= $this->renderInputPlaceholder($block);
|
||||
|
||||
$html .= static::getInputValidation($block);
|
||||
$html .= $this->getInputValidation($block);
|
||||
|
||||
$html .= static::getInputModifiers($block);
|
||||
$html .= $this->getInputModifiers($block);
|
||||
|
||||
$html .= '/>';
|
||||
|
||||
|
Reference in New Issue
Block a user