45 lines
1.3 KiB
PHP
45 lines
1.3 KiB
PHP
<?php
|
|
namespace Stemcell\Customer\Controller\Adminhtml\Salesperson;
|
|
|
|
use Magento\Backend\App\Action\Context;
|
|
use Magento\Framework\App\Action\HttpGetActionInterface;
|
|
use Magento\Framework\Controller\ResultInterface;
|
|
use Magento\Framework\Exception\LocalizedException;
|
|
use Magento\Framework\Exception\NoSuchEntityException;
|
|
use Magento\Framework\View\Result\PageFactory;
|
|
use Stemcell\Customer\Model\SalespersonRepository;
|
|
|
|
class NewAction extends \Magento\Backend\App\Action implements HttpGetActionInterface
|
|
{
|
|
|
|
/**
|
|
* @var PageFactory
|
|
*/
|
|
protected PageFactory $resultPageFactory;
|
|
protected SalespersonRepository $repository;
|
|
protected \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory;
|
|
|
|
public function __construct(
|
|
Context $context,
|
|
PageFactory $resultPageFactory,
|
|
\Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory,
|
|
SalespersonRepository $repository
|
|
) {
|
|
parent::__construct($context);
|
|
$this->resultForwardFactory = $resultForwardFactory;
|
|
}
|
|
|
|
/**
|
|
* Execute view action
|
|
*
|
|
* @return ResultInterface
|
|
* @throws LocalizedException
|
|
*/
|
|
public function execute()
|
|
{
|
|
$resultForward = $this->resultForwardFactory->create();
|
|
$resultForward->forward('edit');
|
|
return $resultForward;
|
|
}
|
|
}
|