Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-payment
Block
Info
Substitution.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Block\Info
;
7
11
class
Substitution
extends
\Magento\Payment\Block\Info
12
{
18
protected
function
_beforeToHtml
()
19
{
20
$parentBlock
= $this->
getParentBlock
();
21
if
(!
$parentBlock
) {
22
return
$this;
23
}
24
25
$container =
$parentBlock
->getParentBlock();
26
if
($container) {
27
$block
= $this->_layout->createBlock(
28
\
Magento
\Framework\View\Element\Template::class,
29
''
,
30
[
'data'
=> [
'method'
=> $this->
getMethod
(),
'template'
=>
'Magento_Payment::info/substitution.phtml'
]]
31
);
32
$container->setChild(
'order_payment_additional'
,
$block
);
33
}
34
return
$this;
35
}
36
}
Magento\Payment\Block\Info
Definition:
Info.php:14
Magento\Framework\View\Element\AbstractBlock\getParentBlock
getParentBlock()
Definition:
AbstractBlock.php:251
Magento\Payment\Block\Info
Definition:
AbstractContainer.php:6
Magento\Payment\Block\Info\Substitution\_beforeToHtml
_beforeToHtml()
Definition:
Substitution.php:18
$block
$block
Definition:
block.php:8
$parentBlock
$parentBlock
Definition:
details.phtml:11
Magento
Magento\Payment\Block\Info\Substitution
Definition:
Substitution.php:11
Magento\Payment\Block\Info\getMethod
getMethod()
Definition:
Info.php:50