Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Layout.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Ui\Component;
7 
8 use Magento\Framework\View\Layout\Pool as LayoutPool;
12 
17 {
18  const NAME = 'layout';
19 
23  protected $layoutPool;
24 
28  protected $type;
29 
33  protected $layoutTypeObject;
34 
38  protected $structure = [];
39 
49  public function __construct(
51  LayoutPool $layoutPool,
52  $type,
53  array $components = [],
54  array $data = []
55  ) {
56  $this->layoutPool = $layoutPool;
57  $this->type = $type;
58  parent::__construct($context, $components, $data);
59  }
60 
66  public function getComponentName()
67  {
68  return static::NAME;
69  }
70 
76  public function prepare()
77  {
78  $this->layoutTypeObject = $this->layoutPool->create($this->type);
79  $this->structure = $this->layoutTypeObject->build($this);
80  parent::prepare();
81  }
82 
86  public function getStructure()
87  {
88  return $this->structure;
89  }
90 }
__construct(ContextInterface $context, LayoutPool $layoutPool, $type, array $components=[], array $data=[])
Definition: Layout.php:49