Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Block.php
Go to the documentation of this file.
1 <?php
7 
12 
17 {
18  const NAME = 'blockWrapper';
19 
23  protected $block;
24 
33  public function __construct(
36  array $components = [],
37  array $data = []
38  ) {
39  $this->block = $block;
40  parent::__construct($context, $components, $data);
41  }
42 
48  public function getBlock()
49  {
50  return $this->block;
51  }
52 
58  public function getComponentName()
59  {
60  return static::NAME;
61  }
62 
66  public function render()
67  {
68  return $this->block->toHtml();
69  }
70 
74  public function getConfiguration()
75  {
76  return array_merge(
77  (array) $this->block->getData('config'),
78  (array) $this->getData('config')
79  );
80  }
81 }
__construct(ContextInterface $context, BlockInterface $block, array $components=[], array $data=[])
Definition: Block.php:33