Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Container.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Catalog\Block\Product\AwareInterface as ProductAwareInterface;
9 
16 class Container extends Block
17 {
22  public function getChildHtml($alias = '', $useCache = false)
23  {
24  $layout = $this->getLayout();
25  if ($layout) {
26  $name = $this->getNameInLayout();
27  foreach ($layout->getChildBlocks($name) as $child) {
28  if ($child instanceof ProductAwareInterface) {
29  $child->setProduct($this->getProduct());
30  }
31  }
32  }
33  return parent::getChildHtml($alias, $useCache);
34  }
35 }
if(!trim($html)) $alias
Definition: details.phtml:20
if(!isset($_GET['name'])) $name
Definition: log.php:14