NewAction.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Smartwave\Dailydeals\Controller\Adminhtml\Dailydeal;
  3. class NewAction extends \Magento\Backend\App\Action
  4. {
  5. /**
  6. * Redirect result factory
  7. *
  8. * @var \Magento\Backend\Model\View\Result\ForwardFactory
  9. */
  10. protected $resultForwardFactory;
  11. /**
  12. * constructor
  13. *
  14. * @param \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory
  15. * @param \Magento\Backend\App\Action\Context $context
  16. */
  17. public function __construct(
  18. \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory,
  19. \Magento\Backend\App\Action\Context $context
  20. ) {
  21. $this->resultForwardFactory = $resultForwardFactory;
  22. parent::__construct($context);
  23. }
  24. /**
  25. * forward to edit
  26. *
  27. * @return \Magento\Backend\Model\View\Result\Forward
  28. */
  29. public function execute()
  30. {
  31. $resultForward = $this->resultForwardFactory->create();
  32. $resultForward->forward('edit');
  33. return $resultForward;
  34. }
  35. }