Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Substitution.php
Go to the documentation of this file.
1 <?php
7 
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 }
$block
Definition: block.php:8
$parentBlock
Definition: details.phtml:11