_request->getParam('namespace') === null) { $this->_redirect('admin/noroute'); return; } $component = $this->factory->create($this->_request->getParam('namespace')); $this->prepareComponent($component); $this->_response->appendBody((string) $component->render()); } /** * Call prepare method in the component UI * * @param UiComponentInterface $component * @return void */ protected function prepareComponent(UiComponentInterface $component) { foreach ($component->getChildComponents() as $child) { $this->prepareComponent($child); } $component->prepare(); } }