Index.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Marketplace\Controller\Adminhtml\Partners;
  8. class Index extends \Magento\Marketplace\Controller\Adminhtml\Partners
  9. {
  10. /**
  11. * @var \Magento\Framework\View\Result\PageFactory
  12. */
  13. protected $resultPageFactory;
  14. /**
  15. * @var \Magento\Framework\View\LayoutFactory
  16. */
  17. protected $layoutFactory;
  18. /**
  19. * @param \Magento\Backend\App\Action\Context $context
  20. * @param \Magento\Framework\View\LayoutFactory $layoutFactory
  21. */
  22. public function __construct(
  23. \Magento\Backend\App\Action\Context $context,
  24. \Magento\Framework\View\LayoutFactory $layoutFactory
  25. ) {
  26. parent::__construct($context);
  27. $this->layoutFactory = $layoutFactory;
  28. }
  29. /**
  30. * @return \Magento\Backend\Model\View\Result\Page
  31. */
  32. public function execute()
  33. {
  34. if ($this->getRequest()->isAjax()) {
  35. $output = $this->getLayoutFactory()->create()
  36. ->createBlock(\Magento\Marketplace\Block\Partners::class)
  37. ->toHtml();
  38. $this->getResponse()->appendBody($output);
  39. }
  40. }
  41. /**
  42. * @return \Magento\Framework\View\LayoutFactory
  43. */
  44. public function getLayoutFactory()
  45. {
  46. return $this->layoutFactory;
  47. }
  48. }