Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
HtmlContentFactory.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
15  public function create(array &$bundleComponents, array $arguments = [])
16  {
17  if (!isset($arguments['context']) || !isset($bundleComponents['arguments']['block']['name'])) {
18  return false;
19  }
21  $layout = $arguments['context']->getPageLayout();
22 
23  $block = $layout->getBlock($bundleComponents['arguments']['block']['name']);
24  $bundleComponents['arguments']['block'] = $block;
25  return true;
26  }
27 }
$block
Definition: block.php:8
$arguments