9
9
use Magento \Framework \App \RequestInterface ;
10
10
use Magento \Framework \Registry ;
11
11
use Magento \Framework \Controller \Result \ForwardFactory ;
12
+ use Magento \Framework \Controller \Result \RedirectFactory ;
12
13
13
14
class OrderLoader implements OrderLoaderInterface
14
15
{
@@ -37,6 +38,11 @@ class OrderLoader implements OrderLoaderInterface
37
38
*/
38
39
protected $ resultForwardFactory ;
39
40
41
+ /**
42
+ * @var RedirectFactory
43
+ */
44
+ protected $ redirectFactory ;
45
+
40
46
/**
41
47
* @param \Magento\Sales\Model\OrderFactory $orderFactory
42
48
* @param OrderViewAuthorizationInterface $orderAuthorization
@@ -49,13 +55,15 @@ public function __construct(
49
55
OrderViewAuthorizationInterface $ orderAuthorization ,
50
56
Registry $ registry ,
51
57
\Magento \Framework \UrlInterface $ url ,
52
- ForwardFactory $ resultForwardFactory
58
+ ForwardFactory $ resultForwardFactory ,
59
+ RedirectFactory $ redirectFactory
53
60
) {
54
61
$ this ->orderFactory = $ orderFactory ;
55
62
$ this ->orderAuthorization = $ orderAuthorization ;
56
63
$ this ->registry = $ registry ;
57
64
$ this ->url = $ url ;
58
65
$ this ->resultForwardFactory = $ resultForwardFactory ;
66
+ $ this ->redirectFactory = $ redirectFactory ;
59
67
}
60
68
61
69
/**
@@ -78,7 +86,7 @@ public function load(RequestInterface $request)
78
86
return true ;
79
87
}
80
88
/** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
81
- $ resultRedirect = $ this ->resultRedirectFactory ->create ();
89
+ $ resultRedirect = $ this ->redirectFactory ->create ();
82
90
return $ resultRedirect ->setUrl ($ this ->url ->getUrl ('*/*/history ' ));
83
91
}
84
92
}
0 commit comments