Skip to content

Commit b4a7f92

Browse files
authored
Fix
1 parent d0f2201 commit b4a7f92

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/code/Magento/Payment/Helper/Data.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
3131
*/
3232
protected $_paymentConfig;
3333

34+
/**
35+
* @var \Magento\Framework\View\LayoutFactory
36+
*/
37+
protected $_layoutFactory;
3438

3539
/**
3640
* Factory for payment method models
@@ -70,6 +74,7 @@ public function __construct(
7074
\Magento\Framework\App\Config\Initial $initialConfig
7175
) {
7276
parent::__construct($context);
77+
$this->_layoutFactory = $_layoutFactory;
7378
$this->_methodFactory = $paymentMethodFactory;
7479
$this->_appEmulation = $appEmulation;
7580
$this->_paymentConfig = $paymentConfig;
@@ -176,7 +181,7 @@ public function getMethodFormBlock(MethodInterface $method, LayoutInterface $lay
176181
*/
177182
public function getInfoBlock(InfoInterface $info, LayoutInterface $layout = null)
178183
{
179-
$layout = $layout ?: $layoutFactory->create();
184+
$layout = $layout ?: $this->_layoutFactory->create();
180185
$blockType = $info->getMethodInstance()->getInfoBlockType();
181186
$block = $layout->createBlock($blockType);
182187
$block->setInfo($info);

0 commit comments

Comments
 (0)