Wizard.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\ConfigurableProduct\Controller\Adminhtml\Product;
  7. use Magento\Framework\App\Action\HttpGetActionInterface;
  8. use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
  9. use Magento\Backend\App\Action;
  10. use Magento\Framework\Controller\ResultFactory;
  11. use Magento\Catalog\Controller\Adminhtml\Product\Builder;
  12. use Magento\Backend\App\Action\Context;
  13. /**
  14. * Class Wizard
  15. */
  16. class Wizard extends Action implements HttpPostActionInterface, HttpGetActionInterface
  17. {
  18. /**
  19. * Authorization level of a basic admin session
  20. *
  21. * @see _isAllowed()
  22. */
  23. const ADMIN_RESOURCE = 'Magento_Catalog::products';
  24. /**
  25. * @var Builder
  26. */
  27. protected $productBuilder;
  28. /**
  29. * @param Context $context
  30. * @param Builder $productBuilder
  31. */
  32. public function __construct(Context $context, Builder $productBuilder)
  33. {
  34. parent::__construct($context);
  35. $this->productBuilder = $productBuilder;
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function execute()
  41. {
  42. $this->productBuilder->build($this->getRequest());
  43. /** @var \Magento\Framework\View\Result\Layout $resultLayout */
  44. $resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT);
  45. return $resultLayout;
  46. }
  47. }