Esempio n. 1
0
 /**
  * Build component structure and retrieve
  *
  * @param UiComponentInterface $component
  * @return array
  */
 public function generate(UiComponentInterface $component)
 {
     /** @var LayoutInterface $layout */
     if (!($layoutDefinition = $component->getData('layout'))) {
         $layoutDefinition = ['type' => 'generic'];
     }
     $layout = $this->layoutPool->create($layoutDefinition['type'], $layoutDefinition);
     return $layout->build($component);
 }
Esempio n. 2
0
 /**
  * Register component and build layout structure
  *
  * @inheritdoc
  */
 public function prepare()
 {
     $this->layoutTypeObject = $this->layoutPool->create($this->type);
     $this->structure = $this->layoutTypeObject->build($this);
     parent::prepare();
 }