layoutFactory = $layoutFactory; } /** * @return \Magento\Backend\Model\View\Result\Page */ public function execute() { if ($this->getRequest()->isAjax()) { $output = $this->getLayoutFactory()->create() ->createBlock(\Magento\Marketplace\Block\Partners::class) ->toHtml(); $this->getResponse()->appendBody($output); } } /** * @return \Magento\Framework\View\LayoutFactory */ public function getLayoutFactory() { return $this->layoutFactory; } }